How to define an alias in fish shell?

前端 未结 10 626
星月不相逢
星月不相逢 2020-12-07 06:56

I would like to define some aliases in fish. Apparently it should be possible to define them in

~/.config/fish/functions

but they don\'t g

10条回答
  •  星月不相逢
    2020-12-07 07:36

    make a function in ~/.config/fish/functions called mkalias.fish and put this in

    function mkalias --argument key value
      echo alias $key=$value
      alias $key=$value
      funcsave $key
    end
    

    and this will create aliases automatically.

提交回复
热议问题