Skip to content

Commit

Permalink
refactor(dnssec-keygen,links,zpofli): use builtin feat for filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored and akinomyoga committed May 9, 2023
1 parent 95e16ff commit 309dec7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions completions/dnssec-keygen
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ _comp_cmd_dnssec_keygen()
if [[ $cur == -* ]]; then
_comp_compgen -R help
((${#COMPREPLY[@]})) &&
_comp_compgen -- -W '$(printf "%s\n" "${COMPREPLY[@]}" |
command sed -e "s/:\$//")'
_comp_compgen -- -W '"${COMPREPLY[@]%:}"'
return
fi
} &&
Expand Down
3 changes: 1 addition & 2 deletions completions/links
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ _comp_cmd_links()
if [[ $cur == -* ]]; then
_comp_compgen -R help
((${#COMPREPLY[@]})) &&
_comp_compgen -- -W '$(printf "%s\n" "${COMPREPLY[@]}" |
command grep -vF -- "->")'
_comp_compgen -- -W '"${COMPREPLY[@]}"' -X "->"
return
fi

Expand Down
3 changes: 1 addition & 2 deletions completions/zopfli
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ _comp_cmd_zopfli()
if [[ $cur == -* ]]; then
_comp_compgen -R help -- -h
((${#COMPREPLY[@]})) &&
_comp_compgen -- -W '$(printf "%s\n" "${COMPREPLY[@]}" |
command sed -e "s/#$//")' -- "$cur"
_comp_compgen -- -W '"${COMPREPLY[@]%#}"'
[[ ${COMPREPLY-} == --i ]] && compopt -o nospace
return
fi
Expand Down

0 comments on commit 309dec7

Please sign in to comment.