whereis: use commands for Bash completions

Currently, the Bash completions for `whereis <TAB>` gives
`whereis file` ("file" is not a placeholder here, it literally expands
to that). This fixes that by passing the `-c` flag to `compgen` to
request completions for command names.

Signed-off-by: Smitty van Bodegom <me@smitop.com>
This commit is contained in:
Smitty 2021-08-08 18:04:30 -04:00
parent 4be393a4ba
commit e091d5b7b1
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ _whereis_module()
return 0
;;
esac
COMPREPLY=( $(compgen -W "file" -- $cur) )
COMPREPLY=( $(compgen -c -- $cur) )
return 0
}
complete -F _whereis_module whereis