cubuvl commited on
Commit
8b9ea3d
·
verified ·
1 Parent(s): d375c2b

Create utils.py

Browse files
Files changed (1) hide show
  1. utils.py +9 -0
utils.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ def format_bash_command(tokens):
2
+ formatted_command = []
3
+ indent = " " * 4
4
+ for token in tokens:
5
+ if token.startswith("-"):
6
+ formatted_command.append("\n" + indent + token)
7
+ else:
8
+ formatted_command.append(" " + token)
9
+ return "".join(formatted_command)