I need to have multiple aliases for one command. I've done it like that:
alias lwbc='$(npm bin)/webpack'
alias lwpc=lwbc
Is this a correct way?
I need to have multiple aliases for one command. I've done it like that:
alias lwbc='$(npm bin)/webpack'
alias lwpc=lwbc
Is this a correct way?
You could use brace expansion.
alias {name1,name2}="echo hello"
or for your example
alias lw{p,b}c="$(npm bin)/webpack"
https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html
lwbc
alias, it will also affect what thelwpc
alias does. If that is what you intend, then your alias is fine. – SauceCode Feb 20 '17 at 20:23alias lwbc=lwpc='$(npm bin)/webpack'
– Max Koretskyi Feb 21 '17 at 06:29