I have a command xssh
that is a wrapper of the original ssh
command. I need a Zsh completion for this command, and the completion rules are exactly the same as zsh
. So what I add a the following to the _xssh
file
#compdef xssh
compdef xssh=ssh
I can load the completion for the command, but the problem is that if it's the first time when I use the xssh
command in a terminal and type <TAB>
, I have to type <TAB>
twice so that the completion can start to work. For example, I have to type xssh ho<TAB><TAB>
to get xssh hostname
. But after that, I only have to type xssh ho<TAB>
to get xssh hostname
(hostname
is unique in my .ssh/config
file). So do you have any idea how to fix this?
This situation will not happen if I write the completion from scratch as I did for my other commands