Limitations of chained commands
Aliases can be very powerful. Be mindful of consequences:
- Multi-command chains in an alias are different than shell pipelines.
Each sub-command in a shell pipeline is started by the shell as a
separate child process, and their input and output is connected using
operating system constructs. A multi-command alias, on the other hand,
executes in the context of a top-level
p4
process, and it executes each sub-command serially, inside the parentp4
process, storing the output in memory. This limits the amount of data that can be piped from one command to the next. - If one chained command fails, no subsequent commands are executed.