File size: 302 Bytes
b19f57b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
def format_bash_command(tokens):
    formatted_command = []
    indent = " " * 4
    for token in tokens:
        if token.startswith("-"):
            formatted_command.append("\n" + indent + token)
        else:
            formatted_command.append(" " + token)
    return "".join(formatted_command)