I have a script that calls a command with tons of optional parameters. To keep things readable, it uses line-continuations to write one parameter per line:
my_command \
-flag1 \
-flag2 \
-flag3 \
-flag4
My problem now is that I would really like to add some comments next to the flags to describe what they do. Is that possible?
This version I tried doesn't work because -flag1
and -flag4
are treated as a separate commands to be run instead of being treated as parameters to my_command
my_command \
# These flags are for doing X
-flag1 \
-flag2 \
-flag3 \
# This last flag is for doing Y
-flag4