[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/exec-path-from-shell 95b7aee732 025/114: Use -d in place o
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/exec-path-from-shell 95b7aee732 025/114: Use -d in place of --login for tcsh (fixes #7) |
Date: |
Tue, 5 Sep 2023 03:59:58 -0400 (EDT) |
branch: elpa/exec-path-from-shell
commit 95b7aee732e302f5f187de6e5c41a0e4fa535f1c
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>
Use -d in place of --login for tcsh (fixes #7)
---
exec-path-from-shell.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 396815fafc..6312add7f4 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -76,6 +76,10 @@
"Double-quote S, escaping any double-quotes already contained in it."
(concat "\"" (replace-regexp-in-string "\"" "\\\\\"" s) "\""))
+(defun exec-path-from-shell--login-arg (shell)
+ "Return the name of the --login arg for SHELL."
+ (if (string-match "tcsh$" shell) "-d" "-l"))
+
(defun exec-path-from-shell-printf (str &optional args)
"Return the result of printing STR in the user's shell.
@@ -92,8 +96,10 @@ shell-escaped, so they may contain $ etc."
(concat "printf '__RESULT\\000" str "' "
(mapconcat #'exec-path-from-shell--double-quote args " "))))
(with-temp-buffer
- (call-process (getenv "SHELL") nil (current-buffer) nil
- "--login" "-i" "-c" printf-command)
+ (let ((shell (getenv "SHELL")))
+ (call-process shell nil (current-buffer) nil
+ (exec-path-from-shell--login-arg shell)
+ "-i" "-c" printf-command))
(goto-char (point-min))
(when (re-search-forward "__RESULT\0\\(.*\\)" nil t)
(match-string 1)))))
- [nongnu] elpa/exec-path-from-shell 9c25f03459 006/114: Simplify initialization, (continued)
- [nongnu] elpa/exec-path-from-shell 9c25f03459 006/114: Simplify initialization, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 0b81e0bf05 007/114: Copy $MANPATH on initialization, too, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell f349bc25aa 009/114: Merge pull request #2 from lunaryorn/init-manpath, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell f88aa7edec 010/114: Make the list of copied variables customizable. (See #2), ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell ed17558245 011/114: Fix local variables block formatting, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 3b280d3093 013/114: Set all variables using just one shell invocation, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 4b2f672301 020/114: Make use of printf safer, in case env var values contain escapes (see #5), ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 89aed99c12 021/114: Can now single-quote format argument to printf, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 2b6651242f 018/114: Unambigiously escape the null character (fixes #5), ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 9f034cdb97 022/114: Explicitly double-quote args, so empty var values don't mess things up, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 95b7aee732 025/114: Use -d in place of --login for tcsh (fixes #7),
ELPA Syncer <=
- [nongnu] elpa/exec-path-from-shell 96afc511bb 030/114: Add missing custom type, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell bfaa02106e 031/114: [Fix #13] Make shell arguments customizable, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell a5162e6f99 032/114: Merge pull request #14 from lunaryorn/customizable-args, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 0e0af3907a 040/114: For non-POSIX shells (mainly fish and tcsh), print vars in a standard "sh" subshell, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell dccbb54b18 041/114: Add note about fish and tcsh to README, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 7f77aa6dfb 052/114: Revert "Remove unnecessary dash to appease old csh", ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell e88cce5a93 067/114: Fix checkdoc warnings, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 51d0931c2a 003/114: Improve suggested condition for initialization on OS X, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 900d98a912 005/114: Improve docstrings, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 1115e59539 033/114: Provide better info when the shell doesn't printf vars as expected, ELPA Syncer, 2023/09/05