Skip to content

Commit

Permalink
arch: Parse options from --help
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 21, 2017
1 parent 7fa35af commit ca31dfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions completions/arch
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ _arch()
$split && return

if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '--wipe --start --end --quiet --help' \
-- "$cur" ) )
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
else
local args=$cword
for (( i=1; i < cword; i++ )); do
Expand Down
5 changes: 1 addition & 4 deletions test/lib/completions/arch.exp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ proc teardown {} {
setup


set options {--wipe -s --start= -e --end= -q --quiet -h --help}
assert_complete $options "arch -"


assert_complete_any "arch -"
sync_after_int


Expand Down

0 comments on commit ca31dfa

Please sign in to comment.