[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' locat
Re: [Emacs-diffs] master e82c4f5: Don't assume /bin/sh as the 'sh' location in the local host
Wed, 02 Aug 2017 11:54:56 -0400
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
> It was mentioned by Michael as a possibility. I chose it because is a
> defcustom: it might reflect an user preference compared with shell-file-name
> which is given.
explicit-shell-file-name is normally used when the user asks for a shell
(e.g. M-x shell), whereas shell-file-name is used whenever we want to
run a shell command (e.g. `shell-command`).
The docstring of `shell` says:
Program used comes from variable `explicit-shell-file-name',
or (if that is nil) from the ESHELL environment variable,
or (if that is nil) from `shell-file-name'.
> For example, my shell-file-name is bash. I might customize
> explicit-shell-file-name to '/bin/zsh', then i can
> use '**/' zsh syntaxis in the wildcard expansion:
> (let ((buf
> (dired-noselect (expand-file-name "**/*.el" source-directory))))
> (with-current-buffer buf
> (length (dired-get-marked-files))))
> => 1731
> ;; => 277 ; If i would use shell-file-name
But setting explicit-shell-file-name to `/bin/zsh` doesn't let you use
`**/` in M-! whereas if you had set shell-file-name to `/bin/zsh` you'd
get that extra functionality everywhere.