[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/23: bash completion: Complete ‘guix build’ file names.
From: |
guix-commits |
Subject: |
05/23: bash completion: Complete ‘guix build’ file names. |
Date: |
Sun, 3 Oct 2021 13:28:18 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 9e3355d2a35796276d17af13ac45814dbf6c4203
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Oct 3 13:50:10 2021 +0200
bash completion: Complete ‘guix build’ file names.
* etc/completion/bash/guix
(_guix_complete_available_package_or_store_file): New function.
(_guix_complete): Call it in place of _guix_complete_available_package
after the ‘build’ command.
---
etc/completion/bash/guix | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 724d35b..fcf9482 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -171,6 +171,18 @@ _guix_complete_file ()
COMPREPLY=()
}
+_guix_complete_available_package_or_store_file ()
+{
+ _guix_complete_available_package "$@"
+
+ # The current _guix_complete_file implementation doesn't compose (append to
+ # COMPREPLY), so we suggest file names only if no package names matched.
+ if [[ -z "$COMPREPLY" ]]
+ then
+ _guix_complete_file # TODO: restrict to store files
+ fi
+}
+
_guix_complete_pid ()
{
local pids="$(cd /proc; echo [0-9]*)"
@@ -251,7 +263,7 @@ _guix_complete ()
then
_guix_complete_file
else
- _guix_complete_available_package "$word_at_point"
+ _guix_complete_available_package_or_store_file
"$word_at_point"
fi
elif [[ "$command" = "environment" ]]
then
- 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 <=
- 07/23: bash completion: Fix ‘system’ & ‘container’ subcommands., guix-commits, 2021/10/03
- 02/23: bash completion: Consolidate similar $command ‘if’ branches., guix-commits, 2021/10/03
- 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