guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: bash completion: Complete ‘guix shell -f’.


From: guix-commits
Subject: branch master updated: bash completion: Complete ‘guix shell -f’.
Date: Wed, 08 Dec 2021 15:10:56 -0500

This is an automated email from the git hooks/post-receive script.

nckx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f3af1fb  bash completion: Complete ‘guix shell -f’.
f3af1fb is described below

commit f3af1fb0bcbcbe18ab773374efe606e90107cfb6
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Wed Dec 8 21:05:20 2021 +0100

    bash completion: Complete ‘guix shell -f’.
    
    * etc/completion/bash/guix (_guix_complete): Suggest a file name
    following ‘guix shell […] -f’.
---
 etc/completion/bash/guix | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 6a11e1b..f262d4d 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -275,9 +275,13 @@ _guix_complete ()
                 fi
            elif [[ "$command" = "environment" || "$command" = "shell" ]]
            then
-                if _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || 
_guix_is_dash_l
-                then
-                    _guix_complete_file
+               if _guix_is_dash_f && [[ "$command" = "shell" ]]
+               then
+                   # The otherwise identical ‘guix environment’ lacks the ‘-f’ 
option.
+                   _guix_complete_file
+               elif _guix_is_dash_L || _guix_is_dash_m || _guix_is_dash_p || 
_guix_is_dash_l
+               then
+                   _guix_complete_file
                elif _guix_is_option "$word_at_point"
                then
                    _guix_complete_option "$command_index" "$word_at_point"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]