Closed ANTARESXXI closed 9 years ago
Hmm, I don't think there's really any way to achieve that without "reinventing the wheel" of shell operators. Operators like &&
and |
are parsed by the shell, and an individual program has no ability to "see" them. If you want the composability that the shell gives you, I'd say that's probably a sign that your individual commands are different enough that they should just be split into separate executables.
Ok, thanks for reply.
Hello!
Is there any solution to use command sequences in a short way? For example:
my_gem_based_on_commander cmd1 [some_args] && cmd2 [some_other_args]
instead of
my_gem_based_on_commander cmd1 [some_args] && my_gem_based_on_commander cmd2 [some_other_args]
Also is there any way to support command pipeline (passing results from one command to another like in macos's bash) ? For example:
my_gem_based_on_commander cmd1 [some_args] | cmd2 [some_other_args]