[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/23: bash completion: Consolidate similar $command ‘if’ branches.
From: |
guix-commits |
Subject: |
02/23: bash completion: Consolidate similar $command ‘if’ branches. |
Date: |
Sun, 3 Oct 2021 13:28:17 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 6fba67df1928a62abc7939bd8ff020e998ad8d6b
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Oct 3 13:15:56 2021 +0200
bash completion: Consolidate similar $command ‘if’ branches.
* etc/completion/bash/guix (_guix_complete): Combine the ‘upgrade’ and
‘remove’ commands, as well as ‘download’, ‘gc’, and ‘hash’.
---
etc/completion/bash/guix | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index a9386e7..112ea78 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -237,15 +237,7 @@ _guix_complete ()
else
_guix_complete_available_package "$word_at_point"
fi
- elif [[ "$command" = "remove" ]]
- then
- if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
- then
- _guix_complete_file
- else
- _guix_complete_installed_package "$word_at_point"
- fi
- elif [[ "$command" = "upgrade" ]]
+ elif [[ "$command" = "upgrade" || "$command" = "remove" ]]
then
if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p
then
@@ -272,9 +264,9 @@ _guix_complete ()
else
_guix_complete_available_package "$word_at_point"
fi
- elif [[ "$command" = "download" ]]
+ elif [[ "$command" = "download" || "$command" = "gc" || "$command"
= "hash" ]]
then
- _guix_complete_file
+ _guix_complete_file
elif [[ "$command" = "system" ]]
then
case $COMP_CWORD in
@@ -305,9 +297,6 @@ _guix_complete ()
elif [[ "$command" = "import" ]]
then
_guix_complete_subcommand
- elif [[ "$command" = "hash" || "$command" = "gc" ]]
- then
- _guix_complete_file
elif [[ "$command" = "weather" ]]
then
if _guix_is_dash_m
- branch master updated (c98c9c5 -> 91389d4), guix-commits, 2021/10/03
- 04/23: bash completion: Complete ‘guix weather’ packages., guix-commits, 2021/10/03
- 05/23: bash completion: Complete ‘guix build’ file names., guix-commits, 2021/10/03
- 07/23: bash completion: Fix ‘system’ & ‘container’ subcommands., guix-commits, 2021/10/03
- 02/23: bash completion: Consolidate similar $command ‘if’ branches.,
guix-commits <=
- 03/23: bash completion: Append to $COMPREPLY where possible., guix-commits, 2021/10/03
- 08/23: gnu: os-prober: Update to 1.79., guix-commits, 2021/10/03
- 11/23: gnu: ccache: Update to 4.4.2., guix-commits, 2021/10/03
- 14/23: gnu: dnsmasq: Prepare for cross-compilation., guix-commits, 2021/10/03
- 15/23: gnu: sx: Update to 2.1.7., guix-commits, 2021/10/03
- 17/23: gnu: yadifa: Update to 2.5.1 [security fixes]., guix-commits, 2021/10/03
- 09/23: gnu: libhx: Update to 4.0.1., guix-commits, 2021/10/03
- 10/23: gnu: snapraid: Update to 11.6., guix-commits, 2021/10/03
- 13/23: gnu: dnsmasq: Update to 2.86., guix-commits, 2021/10/03
- 16/23: gnu: sx: Don't propagate xauth., guix-commits, 2021/10/03