purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.41k stars 81 forks source link

Remove code that results on -l shell option #29

Closed emacs18 closed 9 years ago

emacs18 commented 9 years ago

(exec-path-from-shell--login-arg (getenv "SHELL")) produces -l when I'm using /bin/csh on Red Hat 5.

When -l is combined with other shell options, /bin/csh fails. Perhaps it is because my csh is so old (older than 10 years). Perhaps it is just illegal to be combining -l with any other shell option according to the following quote of csh manual:

 -l     The shell is a login shell (only applicable if -l is the only flag
        specified).

I share this pull request not expecting it to be accepted, but just to highlight the problem I face when using old csh.

I don't know what the proper solution is, because I don't understand what the purpose of (exec-path-from-shell--login-arg (getenv "SHELL")) expression is. I'll be willing to help resolve this problem if I can.

purcell commented 9 years ago

Thanks. I fixed this in bb20b46, which also makes the fix in #29 unnecessary, so I've reverted that. Essentially, csh works just like tcsh with regard to both these issues, so I've extended the existing tcsh handling to also cover csh.

Thanks for bringing these problems to my attention, and for taking the time to submit PRs! :-)