branch: elpa/exec-path-from-shell
commit b09a42885c6b65928f36e04880a4d84a4eabf2b3
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>

    tcsh doesn't support the ${VAR-default} syntax
---
 exec-path-from-shell.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index b8a368ea4a..546a76471f 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -137,8 +137,9 @@ shell-escaped, so they may contain $ etc."
 
 Execute $SHELL according to `exec-path-from-shell-arguments'.
 The result is a list of (NAME . VALUE) pairs."
-  (let* ((dollar-names (mapcar (lambda (n) (format "${%s-}" n)) names))
-         (values (if (exec-path-from-shell--tcsh-p (getenv "SHELL"))
+  (let* ((is-tcsh (exec-path-from-shell--tcsh-p (getenv "SHELL")))
+         (dollar-names (mapcar (lambda (n) (format (if is-tcsh "$%s" "${%s-}") 
n)) names))
+         (values (if is-tcsh
                      ;; Dumb shell
                      (mapcar (lambda (v)
                                (exec-path-from-shell-printf "%s" (list v)))

Reply via email to