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

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

[nongnu] elpa/bash-completion f31bb46ff4 222/313: Making sure that line


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion f31bb46ff4 222/313: Making sure that line editing is turned off (#42)
Date: Sat, 3 Dec 2022 10:59:32 -0500 (EST)

branch: elpa/bash-completion
commit f31bb46ff4cf8d28d37290fa6173ec31e73412f7
Author: Tyler Ware <tyler.ware.777@gmail.com>
Commit: GitHub <noreply@github.com>

    Making sure that line editing is turned off (#42)
    
    If either `set -o emacs` or `set -o vi` is in the user's `.bashrc` the
    completion process fails to start. That is expected (this is why
    bash is run with `--noediting`). This change takes into account
    that a user might have explicitly turned it on.
---
 bash-completion.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bash-completion.el b/bash-completion.el
index 2514a9af5c..f86470053e 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -987,7 +987,11 @@ is set to t."
                 ;; but only in some environment. disable this dreadful
                 ;; business to get a saner way of handling spaces.
                 ;; Noticed in bash_completion v1.872.
-                "function quote_readline { echo \"$1\"; }\n"))
+                "function quote_readline { echo \"$1\"; }\n"
+                ;; User's profiles can turn line editing back on,
+                ;; so make sure it's off
+                "set +o emacs\n"
+                "set +o vi\n"))
 
               (bash-completion-send "PROMPT_COMMAND='';PS1='\t$?\v'" process 
bash-completion-initial-timeout)
               (bash-completion-send "complete -p" process)



reply via email to

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