3

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?

  • 1
    Did you try it? – SauceCode Feb 20 '17 at 18:58
  • @SauceCode, sure, it works – Maxim Koretskyi Feb 20 '17 at 18:58
  • Great. But then you need to clarify what you mean when you ask if it's correct. – SauceCode Feb 20 '17 at 19:01
  • @SauceCode, optimal way maybe – Maxim Koretskyi Feb 20 '17 at 19:51
  • To state the obvious, if you later decide to change the command executed by the lwbc alias, it will also affect what the lwpc alias does. If that is what you intend, then your alias is fine. – SauceCode Feb 20 '17 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.