|
|
|
|
|
by nerdponx
1326 days ago
|
|
The only thing to keep in mind about Zsh parameter expansion is that unquoted empty values will be dropped entirely, while quoted empty values will be treated like the empty string '': show_nargs() { print $# }
q=
show_nargs $q # 0
show_nargs "$q" # 1
So it doesn't completely solve the need for defensive quoting, but at least it mitigates the need for the most part. |
|