3 ms·
Shell functions do the same thing as aliases, and have fewer parsing problems, and they have more flexible arguments. Instead of: alias ls='ls --color' B
by chubot 6y ago
Shell functions do the same thing as aliases, and have fewer parsing problems, and they have more flexible arguments. Instead of:
alias ls='ls --color'
Better:
ls() {
command ls --color "$@"
}
(The "command" prefix avoids recursion)
- deleted 6y ago[deleted]