Revision 9133
Added by Aaron Marcuse-Kubitza about 11 years ago
util.sh | ||
---|---|---|
206 | 206 |
|
207 | 207 |
## external commands |
208 | 208 |
|
209 |
function command() { builtin command -- "$@"; } |
|
210 |
|
|
209 | 211 |
alias echo_run_prep='cmd2rel_path; echo_cmd "$@"; cmd_indent' |
210 | 212 |
|
211 | 213 |
fi # load new aliases |
... | ... | |
217 | 219 |
for cmd in rm; do alias "$cmd=echo_run $cmd"; done; unset cmd |
218 | 220 |
|
219 | 221 |
# echo all external commands |
220 |
alias command="echo_run command -- " # last space alias-expands next word
|
|
222 |
alias command='echo_run command ' # last space alias-expands next word
|
|
221 | 223 |
|
222 | 224 |
# commands that are always external |
223 | 225 |
for cmd in env; do alias "$cmd=command $cmd"; done; unset cmd |
Also available in: Unified diff
lib/sh/util.sh: `command`: always prepend -- to the args list (to ensure that the command name is not interpreted as a `command` option), not just when the command alias is used