emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/bash-completion 8270e09294 023/313: pass words as command-


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 8270e09294 023/313: pass words as command-line arguments to the function
Date: Sat, 3 Dec 2022 10:59:12 -0500 (EST)

branch: elpa/bash-completion
commit 8270e09294a51f96c77d1475f405d0bfe84955db
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>

    pass words as command-line arguments to the function
---
 bash-completion.el      | 2 +-
 bash-completion_test.el | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bash-completion.el b/bash-completion.el
index 9f1bbd9662..f880c9ee65 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -233,7 +233,7 @@ The result is a list of candidates, which might be empty."
               (setcar function "-F")
               (setcar (cdr function) "__bash_complete_wrapper")
               (format "__BASH_COMPLETE_WRAPPER=%s compgen %s -- %s"
-                      (bash-completion-quote (format "COMP_LINE=%s; 
COMP_POINT=%s; COMP_CWORD=%s; COMP_WORDS=( %s ); %s \"$@\""
+                      (bash-completion-quote (format "COMP_LINE=%s; 
COMP_POINT=%s; COMP_CWORD=%s; COMP_WORDS=( %s ); %s \"${COMP_WORDS[@]}\""
                                                    (bash-completion-quote 
line) pos cword (bash-completion-join words)
                                                    (bash-completion-quote 
function-name)))
                       (bash-completion-join args)
diff --git a/bash-completion_test.el b/bash-completion_test.el
index 046368853c..4c33ea003e 100644
--- a/bash-completion_test.el
+++ b/bash-completion_test.el
@@ -195,13 +195,13 @@ garbage
       (let ((bash-completion-alist '(("zorg" . ("-F" "__zorg"))))
            (default-directory "/test"))
        (bash-completion-generate-line "zorg worl" 7 '("zorg" "worl") 1))
-      "cd /test ; __BASH_COMPLETE_WRAPPER='COMP_LINE='\\''zorg worl'\\''; 
COMP_POINT=7; COMP_CWORD=1; COMP_WORDS=( zorg worl ); __zorg \"$@\"' compgen -F 
__bash_complete_wrapper -- worl")
+      "cd /test ; __BASH_COMPLETE_WRAPPER='COMP_LINE='\\''zorg worl'\\''; 
COMP_POINT=7; COMP_CWORD=1; COMP_WORDS=( zorg worl ); __zorg 
\"${COMP_WORDS[@]}\"' compgen -F __bash_complete_wrapper -- worl")
 
      ("bash-completion-generate-line custom completion command"
       (let ((bash-completion-alist '(("zorg" . ("-C" "__zorg"))))
            (default-directory "/test"))
        (bash-completion-generate-line "zorg worl" 7 '("zorg" "worl") 1))
-      "cd /test ; __BASH_COMPLETE_WRAPPER='COMP_LINE='\\''zorg worl'\\''; 
COMP_POINT=7; COMP_CWORD=1; COMP_WORDS=( zorg worl ); __zorg \"$@\"' compgen -F 
__bash_complete_wrapper -- worl")
+      "cd /test ; __BASH_COMPLETE_WRAPPER='COMP_LINE='\\''zorg worl'\\''; 
COMP_POINT=7; COMP_CWORD=1; COMP_WORDS=( zorg worl ); __zorg 
\"${COMP_WORDS[@]}\"' compgen -F __bash_complete_wrapper -- worl")
 
      ("bash-completion-line-beginning-position start"
       (sz-testutils-with-buffer



reply via email to

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