在 zshrc 中创建临时别名

sen*_*hil 3 bash zsh

有没有办法创建临时别名,主要是为了减少输入目录路径,尤其是那些不经常使用以保证添加到 .bash_aliases 的路径?

谢谢

Kei*_*ith 5

只需输入一个。

94 $ alias hello='echo hello'
95 $ hello
hello
Run Code Online (Sandbox Code Playgroud)