3 ms·
I don't think programs should be aware of globbing at all except in special circumstances, like with the `find` command. It could be helpful in a few rare circu
by chlorion 5y ago
I don't think programs should be aware of globbing at all except in special circumstances, like with the `find` command. It could be helpful in a few rare circumstances I guess, like with 'rm' as you showed, but you can have the shell itself handle those cases, which is what some shells such as zsh do today.
With regards to trying to pass a literal '*' to commands like calc, I think the user is responsible for escaping the star and not calc itself. Since the shell is what handles glob expansion, calc has no way of even doing so that I can think of. Escaping a glob just requires putting it in single quotes like so
calc '3 * 4 + 5'