fish - fish shell 中带有空格的别名

标签 fish

我想在 fish 中添加一个带有空格的别名,如下所示:

alias hello there 'print hello there'

这有可能吗? (我知道这个例子是无效的,我只是举个例子)。

提前致谢。

最佳答案

目前 fish 的 alias 包装器函数无法做到这一点。

但是,无论如何,最终要做的是定义一个函数,因此您可以这样做。

function "hello there"
    echo hello there
end

执行 "hello there"hello\there

关于fish - fish shell 中带有空格的别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41161234/

相关文章:

autocomplete - 如何搜索 fish 的补全?

bash - 如何在fish shell中进行参数扩展?

shell - 如何从 fish shell 中的命令替换输出中捕获换行符?

fish - 通过 i3 键绑定(bind)运行 Fish shell 函数

bash - 将 bash 函数转换为 fish 函数

shell - Fish shell 中带花括号的 Subversion 命令

fish - 有没有办法像 bash 一样在命令前加上变量赋值?

node.js - fish shell nvm 告诉我 node 和 npm 是 "currently not installed"但它们是

fish shell 提示未正确显示符号

带有参数和 fish shell 的 Git 别名