Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是一个使用 fzf 执行选定别名的函数:
fa() { eval $(alias | fzf | cut -d'=' -f2 | sd -p "'" '') }
问题是有时您想向别名添加更多参数,而不是立即执行它。这可能吗?
使用 zsh 的解决方案:
fa() { print -z $(alias | fzf | cut -d'=' -f2 | sd -p "'" '') }