completion: match exe on basename alone

This commit is contained in:
Kovid Goyal 2023-10-10 05:22:40 +05:30
parent 16e7ca3a95
commit 5d0dabe51c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -571,6 +571,7 @@ func (self *Command) GetCompletions(argv []string, init_completions func(*Comple
}
if len(argv) > 0 {
exe := argv[0]
exe = filepath.Base(exe) // zsh completion script passes full path to exe when using aliases
cmd := self.FindSubCommand(exe)
if cmd != nil {
if cmd.ParseArgsForCompletion != nil {