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

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

[nongnu] elpa/bash-completion f085c41d8d 131/313: Add defcustom for bash


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion f085c41d8d 131/313: Add defcustom for bash-completion-args
Date: Sat, 3 Dec 2022 10:59:23 -0500 (EST)

branch: elpa/bash-completion
commit f085c41d8d9a3e9bfc091209b33128b84d0ee163
Author: Svend Sorensen <svend@ciffer.net>
Commit: Svend Sorensen <svend@ciffer.net>

    Add defcustom for bash-completion-args
    
    This allows passing custom flags, such as `--login`, to BASH.
---
 bash-completion.el | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/bash-completion.el b/bash-completion.el
index 93bd540150..43931dc19d 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -166,6 +166,11 @@ for command-line completion."
   :type '(file :must-match t)
   :group 'bash-completion)
 
+(defcustom bash-completion-args '("--noediting")
+  "Args passed to the BASH shell."
+  :type '(repeat (string :tag "Argument"))
+  :group 'bash-completion)
+
 (defcustom bash-completion-process-timeout 2.5
   "Number of seconds to wait for an answer from bash.
 If bash takes longer than that to answer, the answer will be
@@ -874,11 +879,12 @@ is set to t."
            (setenv "EMACS_BASH_COMPLETE" "t")
            (setenv "TERM" "dumb")
            (setq process
-                 (start-process
-                  "*bash-completion*"
-                  (generate-new-buffer-name " bash-completion")
-                  bash-completion-prog
-                  "--noediting"))
+                 (apply 'start-process
+                         (append
+                          `("*bash-completion*"
+                            ,(generate-new-buffer-name " bash-completion")
+                            ,bash-completion-prog)
+                          bash-completion-args)))
            (set-process-query-on-exit-flag process nil)
            (let* ((shell-name (file-name-nondirectory bash-completion-prog))
                   (startfile1 (concat "~/.emacs_" shell-name ".sh"))



reply via email to

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