fish域名_macli autocompletion自动补全命令是指在使用fish shell时,通过安装并配置相应的插件或脚本,实现对域名_macli命令的自动补全功能,这样可以提高命令行操作的效率和准确性。

具体操作步骤如下:
1、首先确保已经安装了fish shell,如果没有安装,可以通过以下命令进行安装:
对于Ubuntu/Debian系统:
“`
sudo aptget install fish
“`
对于macOS系统:
“`

brew install fish
“`
2、安装fish插件管理器:
“`
curl Lo ~/.config/fish/functions/fisher.fish createdirs git.io/fisher
source ~/.config/fish/functions/fisher.fish
“`
3、安装autocompletion插件:

“`
fisher add ohmyfish/pluginautopair
fisher add ohmyfish/pluginpeco
“`
4、编辑fish配置文件(通常位于~/.config/fish/config.fish
),添加以下内容以启用自动补全功能:
“`
function __fish_command_not_found_handler onevent fish_command_not_found
if test (count $argv) gt 1
set last_arg (echo $argv | string match r ".*s(S+)$")[1]
set completions (commandline C $last_arg)
if test (count $completions) gt 0
echo $completions[1]
return 0
end
end
return 1
end
“`
5、保存配置文件并重启fish shell。
当你在fish shell中输入域名_macli
命令时,按下Tab键会自动补全命令,如果有多种可能的补全选项,可以使用上下箭头键在选项之间切换。
【版权声明】:本站所有内容均来自网络,若无意侵犯到您的权利,请及时与我们联系将尽快删除相关内容!
发表回复