shell 命令
Shell 集成和命令补全。
语法
bash
vx shell <subcommand> [options]子命令
init
生成 shell 集成脚本。
bash
vx shell init <shell>支持的 shell:
bashzshfishpowershell
completions
生成命令补全脚本。
bash
vx shell completions <shell>示例
设置 Shell 集成
bash
# 添加到 ~/.bashrc
eval "$(vx shell init bash)"zsh
# 添加到 ~/.zshrc
eval "$(vx shell init zsh)"fish
# 添加到 ~/.config/fish/config.fish
vx shell init fish | sourcepowershell
# 添加到 $PROFILE
Invoke-Expression (& vx shell init powershell | Out-String)安装命令补全
bash
vx shell completions bash > ~/.local/share/bash-completion/completions/vxzsh
vx shell completions zsh > ~/.zfunc/_vxfish
vx shell completions fish > ~/.config/fish/completions/vx.fishpowershell
vx shell completions powershell > ~\Documents\PowerShell\Completions\vx.ps1参见
- Shell 集成 - Shell 集成指南