4 ms·
Note there is one possibly important difference; aliases are resolved before globbing.
by emmelaich 5y ago
Note there is one possibly important difference; aliases are resolved before globbing.
- chubot 5y agoHm what's an example of where you might want to take advantage of that? In practice alias 'lspy=ls *.py' seems to be interchangeable with lspy() { ls *.py "$@" }
- emmelaich 5y agoI have a semi-made desk calculator with prefix notation. You can make it an alias of * , / etc, so ... $ * 4 6 24 $ It would keep it's own stack, but let a persistent process do the actual maths. The persistent process could almost any repl of python, ruby etc. Or use a 'real' calculator like Pike's ivy; https://aplwiki.com/wiki/Ivy https://aplwiki.com/wiki/Ivy
- abathur 5y agoYou can do some wild ~metaprogramming stuff with aliases.
- jolmg 5y agoDo you have examples of something neat?