diff options
Diffstat (limited to 'completions/insmod')
-rw-r--r-- | completions/insmod | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/completions/insmod b/completions/insmod index 36c29dc4..a59e7535 100644 --- a/completions/insmod +++ b/completions/insmod @@ -6,13 +6,13 @@ _insmod() _init_completion || return # do filename completion for first argument - if [[ $cword -eq 1 ]]; then - _filedir '@(?(k)o?(.gz))' + if ((cword == 1)); then + _filedir '@(?(k)o?(.[gx]z))' else # do module parameter completion - COMPREPLY=( $(compgen -W "$(PATH="$PATH:/sbin" modinfo \ - -p ${words[1]} 2>/dev/null | cut -d: -f1)" -- "$cur") ) + COMPREPLY=($(compgen -W "$(PATH="$PATH:/sbin" modinfo \ + -p ${words[1]} 2>/dev/null | cut -d: -f1)" -- "$cur")) fi } && -complete -F _insmod insmod insmod.static + complete -F _insmod insmod insmod.static # ex: filetype=sh |