[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/09: bash completion: Complete subcommands for the current word.
From: |
Ludovic Courtès |
Subject: |
05/09: bash completion: Complete subcommands for the current word. |
Date: |
Mon, 6 Feb 2017 23:08:27 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit f2c66fbe1f01b720741e0fe2bfa619ca2862a6b8
Author: Ludovic Courtès <address@hidden>
Date: Mon Feb 6 17:08:35 2017 +0100
bash completion: Complete subcommands for the current word.
* etc/completion/bash/guix (_guix_complete_subcommand): Refer to
the $COMP_CWORD element instead of the last element.
---
etc/completion/bash/guix | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 00c3dfa..6a5f281 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -26,7 +26,7 @@ _guix_complete_subcommand ()
local subcommands="$(${COMP_WORDS[0]} $command --help 2> /dev/null \
| grep '^ [a-z]' \
| sed -e's/^ \+\([a-z-]\+\).*$/\1/g')"
- COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[${#COMP_WORDS[*]}
- 1]}"))
+ COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}"))
}
_guix_complete_available_package ()
- branch master updated (a24fda8 -> a062b6c), Ludovic Courtès, 2017/02/06
- 03/09: bash completion: Complete file names after 'guix system COMMAND'., Ludovic Courtès, 2017/02/06
- 06/09: services: bitlbee: Read the PID file., Ludovic Courtès, 2017/02/06
- 05/09: bash completion: Complete subcommands for the current word.,
Ludovic Courtès <=
- 02/09: bash completion: Complete 'guix gc' with file names., Ludovic Courtès, 2017/02/06
- 07/09: linux-container: Add 'container-excursion*'., Ludovic Courtès, 2017/02/06
- 01/09: file-systems: Add '%network-configuration-files' and '%network-file-mappings'., Ludovic Courtès, 2017/02/06
- 04/09: bash completion: Properly complete 'guix container exec'., Ludovic Courtès, 2017/02/06
- 09/09: services: bitlbee: Run in a container., Ludovic Courtès, 2017/02/06
- 08/09: Add (gnu build shepherd)., Ludovic Courtès, 2017/02/06