我试过
alias sct='systemctl' complete -F _systemctl sct
但是直到我在会话中运行原始命令 systemctl 后才找到函数 _systemctl 。该函数动态或以某种方式加载,并且内部包含许多其他相同的函数。
操作系统 - Ubuntu 20.04
bash alias auto-completion
alias ×1
auto-completion ×1
bash ×1