I have a few abbreviations that I want to run on one command.

Let's say given this config:

abbr command1 "echo 1"
abbr command2 "echo 2"
abbr command3 "echo 3"

I want another abbr that runs all of them together:

abbr allCommands "command1; command2; command3"

But I get

fish: Unknown command: command1

How could I run all of them together?

1 Answer 1


Fish abbreviations are expanded only at the commandline when pressing Space or Enter.

It sounds like you want an alias. Just replace abbr with alias in each of your commands above, and it should work as you expect.

  • 3
    And note that alias is just a thin wrapper to create a function. Jul 27, 2021 at 14:58
  • Suspected that was the case, thanks
    – shemaya
    Jul 27, 2021 at 15:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.