Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Compound command question

May
12,933
170
If I say "comment_one & command_two" (specifically with command_one being an alias) is there any way that can be known to command_one that it is an antecedent in a compound command?

If not, perhaps a future version could set a flag (_COMPOUND?) specifying the separator following any part (but the last) of a compound command.
 
If I say "comment_one & command_two" (specifically with command_one being an alias) is there any way that can be known to command_one that it is an antecedent in a compound command?

No. But that's not really a compound command -- it's just multiple commands, and as far as the parser is concerned it isn't any different than separating them with a CR/LF. And command groups, single line aliases, multiline FOR statements, etc. are all collapsed into a single line with a & separating each command. So I don't understand how this would be useful to you.

(A real compound command separator would be && or ||.)
 

Similar threads

Back
Top