diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2020-09-23 14:53:44 +0200 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2020-09-23 14:53:44 +0200 |
commit | 1828958db52d0019a7f3d763b07e64f78afa2cbf (patch) | |
tree | 8bdff27c5b3dc088d923e91a14a38f6a6b9fa661 /etc | |
parent | 7e463dd16b7e273011f0beafa57a89fa2d525f8b (diff) | |
parent | 23744435613aa040beacc61a0825cc72280da80a (diff) | |
download | guix-1828958db52d0019a7f3d763b07e64f78afa2cbf.tar.gz guix-1828958db52d0019a7f3d763b07e64f78afa2cbf.zip |
Merge branch 'wip-lisp' into staging
Diffstat (limited to 'etc')
-rw-r--r-- | etc/completion/bash/guix | 30 | ||||
-rwxr-xr-x | etc/guix-install.sh | 2 |
2 files changed, 16 insertions, 16 deletions
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 5aebd074e9..98d20484f7 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -19,6 +19,19 @@ # Bash completion for Guix commands. declare _guix_available_packages +declare _guix_commands + +_guix_complete_command () +{ + local word_at_point="${COMP_WORDS[$COMP_CWORD]}" + if [ -z "$_guix_commands" ] + then + # Cache the list of commands to speed things up. + _guix_commands="$(guix --help 2> /dev/null \ + | grep '^ ' | cut -c 2-)" + fi + COMPREPLY=($(compgen -W "$_guix_commands" -- "$word_at_point")) +} _guix_complete_subcommand () { @@ -146,19 +159,6 @@ _guix_complete_pid () COMPREPLY=($(compgen -W "$pids" -- "$1")) } -declare _guix_subcommands - -_guix_complete_subcommand () -{ - if [ -z "$_guix_subcommands" ] - then - # Cache the list of subcommands to speed things up. - _guix_subcommands="$(guix --help 2> /dev/null \ - | grep '^ ' | cut -c 2-)" - fi - COMPREPLY=($(compgen -W "$_guix_subcommands" -- "$word_at_point")) -} - _guix_complete () { local word_count=${#COMP_WORDS[*]} @@ -176,7 +176,7 @@ _guix_complete () case $COMP_CWORD in 1) - _guix_complete_subcommand + _guix_complete_command ;; *) if _guix_is_command "package" @@ -251,7 +251,7 @@ _guix_complete () then _guix_complete_file else - _guix_complete_subcommand + _guix_complete_command fi elif _guix_is_command "container" then diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 72dc3839e8..aa77d42615 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -111,7 +111,7 @@ chk_gpg_keyring() # systems where gpg has never been used, causing errors and confusion. gpg --dry-run --list-keys ${OPENPGP_SIGNING_KEY_ID} >/dev/null 2>&1 || ( _err "${ERR}Missing OpenPGP public key. Fetch it with this command:" - echo " wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | sudo -i gpg --import -" + echo " wget 'https://sv.gnu.org/people/viewgpg.php?user_id=15145' -qO - | sudo -i gpg --import -" exit 1 ) } |