0%

How to define an alias in fish shell

In fish shell, type the following commands:

  • use alias
    define alias in .config/fish/config.fish
    1
    alias foo 'bar'
  • use function
    1
    2
    3
    4
    $ function foo
    command echo 'foo was here' $argv
    end
    $ funcsave foo
    You should see a file foo.fish under ~/.config/fish/functions/