mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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.
This commit is contained in:
parent
cb151c68bf
commit
868ef9aec7
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ _guix_complete_installed_package ()
|
||||||
_guix_complete_option ()
|
_guix_complete_option ()
|
||||||
{
|
{
|
||||||
local options="$(${COMP_WORDS[0]} ${COMP_WORDS[1]} --help \
|
local options="$(${COMP_WORDS[0]} ${COMP_WORDS[1]} --help \
|
||||||
| grep '^ -' \
|
| grep '^ \+-' \
|
||||||
| sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g' )"
|
| sed -e's/^.*--\([a-zA-Z0-9_-]\+\)\(=\?\).*/--\1\2/g' )"
|
||||||
compopt -o nospace
|
compopt -o nospace
|
||||||
COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[$word_count - 1]}"))
|
COMPREPLY=($(compgen -W "$options" -- "${COMP_WORDS[$word_count - 1]}"))
|
||||||
|
|
Loading…
Reference in a new issue