I\'d like to be able to comment out a single flag in a one-line command. Bash only seems to have from # till end-of-line
comments. I\'m looking at tricks like:<
For disabling a part of a command like a && b
, I simply created an empty script x
which is on path, so I can do things like:
mvn install && runProject
when I need to build, and
x mvn install && runProject
when not (using Ctrl + A and Ctrl + E to move to the beginning and end).
As noted in comments, another way to do that is Bash built-in :
instead of x
:
$ : Hello world, how are you? && echo "Fine."
Fine.