我想在fish中定义一些别名.显然,应该有可能在
~/.config/fish/functions
但当我重新启动shell 时,它们不会自动加载.有什么 idea 吗?
我想在fish中定义一些别名.显然,应该有可能在
~/.config/fish/functions
但当我重新启动shell 时,它们不会自动加载.有什么 idea 吗?
只用alias
.以下是一个基本示例:
# Define alias in shell
alias rmi "rm -i"
# Define alias in config file
alias rmi="rm -i"
# This is equivalent to entering the following function:
function rmi
rm -i $argv
end
# Then, to save it across terminal sessions:
funcsave rmi
最后一个命令创建文件~/.config/fish/functions/rmi.fish
.
感兴趣的人可能想在the official manual中了解更多关于鱼类别名的信息.