core/cli: autocomplete module names

This commit is contained in:
Sean Breckenridge 2022-02-21 05:29:25 -08:00 committed by karlicoss
parent 8b01674fed
commit 6185942f78
4 changed files with 21 additions and 11 deletions

View file

@ -8,10 +8,10 @@ _hpi_completion() {
IFS=',' read type value <<< "$completion"
if [[ $type == 'dir' ]]; then
COMREPLY=()
COMPREPLY=()
compopt -o dirnames
elif [[ $type == 'file' ]]; then
COMREPLY=()
COMPREPLY=()
compopt -o default
elif [[ $type == 'plain' ]]; then
COMPREPLY+=($value)