3 ms·
I actually just learned from a different HN thread yesterday [1] that aliases do get expanded if you add this to your shell's rc file: alias watch='watch '
by chrisshroba 4y ago
I actually just learned from a different HN thread yesterday [1] that aliases do get expanded if you add this to your shell's rc file:
alias watch='watch '
Specifically, if an alias ends with a space, it will cause the subsequent arg to be expanded as well. For example, try running:
alias beep=echo
watch beep hello # This will fail
alias watch='watch '
watch beep hello # Now it works!
[1]: https://news.ycombinator.com/item?id=31830879 https://news.ycombinator.com/item?id=31830879
- sfoley 4y agoBrilliant feature, but this is the sort of thing that reinforces the idea that CLIs have awful discoverability compared to GUIs.
- account42 4y agoWhich is why CLIs should come with manuals - there is even a dedicated CLI program to view those (well multiple actually, because standards wouldn't be fun if there was only one).