Skip to content

Commit

Permalink
groupdel: Parse and handle long options
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jul 9, 2017
1 parent c8d40ea commit e987744
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion completions/groupdel
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# groupdel(8) completion -*- shell-script -*-

complete -g groupdel
_groupdel()
{
local cur prev words cword
_init_completion || return

case $prev in
-h|--help)
return
;;
-R|--root)
_filedir -d
return
;;
esac

if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
return
fi

COMPREPLY=( $( compgen -g -- "$cur" ) )
} &&
complete -F _groupdel groupdel

# ex: filetype=sh

0 comments on commit e987744

Please sign in to comment.