Browse Source

bash completion: Complete long options with no short variant.

* etc/completion/bash/guix (_guix_complete_option): Change grep regexp
  to match options that don't have a short option name.
version-0.8.3
Ludovic Courtès 7 years ago
parent
commit
868ef9aec7
  1. 2
      etc/completion/bash/guix

2
etc/completion/bash/guix

@ -35,7 +35,7 @@ _guix_complete_installed_package ()
_guix_complete_option ()
{
local options="$(${COMP_WORDS[0]} ${COMP_WORDS[1]} --help \
| grep '^ -' \
| grep '^ \+-' \
| sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g' )"
compopt -o nospace
COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[$word_count - 1]}"))

Loading…
Cancel
Save