fish shell 中带有空格的别名

Alias with whitespace in fish shell

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

alias hello there 'print hello there'

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

提前致谢。

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

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

function "hello there"
    echo hello there
end

"hello there"hello\ there执行。