[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion c5d4f92e6d 195/313: Still EMACS_BASH_COMPL
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion c5d4f92e6d 195/313: Still EMACS_BASH_COMPLETE using setenv for local processes. |
Date: |
Sat, 3 Dec 2022 10:59:30 -0500 (EST) |
branch: elpa/bash-completion
commit c5d4f92e6ddb45d809c5cf8390d3eb7621e56975
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Still EMACS_BASH_COMPLETE using setenv for local processes.
Setting EMACS_BASH_COMPLETE after process startup doesn't quite work,
as it doesn't apply to init file loaded automatically by bash.
Fix for 802eb4e
---
bash-completion.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bash-completion.el b/bash-completion.el
index f80b1c94bf..5876b1e488 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -928,6 +928,7 @@ is set to t."
(unwind-protect
(progn
(setenv "TERM" "dumb")
+ (setenv "EMACS_BASH_COMPLETE" "t")
(let* ((start-proc-fun (if remote #'start-file-process
#'start-process))
(buffer-name (generate-new-buffer-name "
bash-completion"))
(args `("*bash-completion*"
@@ -948,7 +949,13 @@ is set to t."
;; user
(setq process (apply start-proc-fun args))))
(set-process-query-on-exit-flag process nil)
- (process-send-string process "EMACS_BASH_COMPLETE=t\n")
+ (if remote
+ ;; Set EMACS_BASH_COMPLETE now for remote
+ ;; completion, since setenv doesn't work. This will
+ ;; unfortunately not be available in .bashrc or
+ ;; .bash_profile. TODO: Find a way of getting it to
+ ;; work from the very beginning.
+ (process-send-string process "EMACS_BASH_COMPLETE=t\n"))
(dolist (start-file bash-completion-start-files)
(when (file-exists-p (bash-completion--expand-file-name
start-file))
(process-send-string process (concat ". " start-file "\n"))))
@@ -1001,6 +1008,7 @@ is set to t."
process)
;; finally
(progn
+ (setenv "EMACS_BASH_COMPLETE" nil)
(setenv "TERM" oldterm)
(when cleanup
(condition-case nil
- [nongnu] elpa/bash-completion 68f7d937b7 175/313: Make wordbreak completion work with bash-completion-enable-caching., (continued)
- [nongnu] elpa/bash-completion 68f7d937b7 175/313: Make wordbreak completion work with bash-completion-enable-caching., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2cf76221c2 178/313: Rely on compgen for default completion, instead of doing it with, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f01d8726de 179/313: Remove support filenames options., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5171866b65 180/313: Simplify options a bit, since the only useful option is nospace., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a223260f2d 181/313: Get rid of bash-completion-alist completely., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4f13e00702 183/313: Execute wordbreak completion "properly", as part of the normal, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 34221c1fdd 185/313: Make bash-completion-enable-caching the default, remove the, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8c3995aa98 187/313: run_tests.sh displays the bash command to test against., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 3eba6922e6 190/313: Use executable-find instead of hardcoding /bin/bash., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1d41c58bd5 192/313: Send initialization command as one string, as long as possible., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c5d4f92e6d 195/313: Still EMACS_BASH_COMPLETE using setenv for local processes.,
ELPA Syncer <=
- [nongnu] elpa/bash-completion 24088ede85 196/313: Explicitly mention compatibility with Bash 3 and 4., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0f6466eeb4 197/313: Tell minibuffer not to delay after displaying a message while, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 0c4557a5ed 193/313: Integration test for default completion (-D)., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e7869dd68d 200/313: Fix a bug when no process is associated with the current buffer, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 80be2f37a9 205/313: Check the buffer uses comint-mode before using the same process, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 28ec870dd1 019/313: only one -complete method, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6a0ada6278 038/313: completed test cases, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 7d6236e6e7 100/313: ignore .elc files, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 1aff6d8806 084/313: comment about shell-command, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f5384c6176 051/313: A little refactoring, test case for wordbreak completion, ELPA Syncer, 2022/12/03