此翻译可能已过时。

Shell 补全

mago generate-completions <shell> 会为你指定的 shell 打印一份补全脚本。把它保存到你的 shell 期望的位置,或者直接管道执行,这样它总是与已安装的 Mago 版本一致。

mago generate-completions fish
mago generate-completions fish | source              # fish, ad-hoc
mago generate-completions zsh > ~/.zfunc/_mago      # zsh, persisted
mago generate-completions bash > /etc/bash_completion.d/mago

受支持的 shell:bashzshfishelvishpowershell

参考

Usage: mago generate-completions <SHELL>
参数说明
<SHELL>bashzshfishelvishpowershell 之一。
参数说明
-h, --help打印帮助并退出。

↳ 编辑此页 →