mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-02 02:10:46 -08:00
Since 'eshell-named-command-hook' already makes execution of commands extensible, "which" should be too. This makes sure that "which" returns the right result for quoted commands like "/:cat". * lisp/eshell/em-alias.el (eshell-aliases-file): Allow it to be nil. (eshell-read-aliases-list, eshell-write-aliases-list): Check if 'eshell-aliases-file' is nil. (eshell-maybe-replace-by-alias--which): New function... (eshell-maybe-replace-by-alias): ... use it. * lisp/eshell/esh-cmd.el (eshell-named-command-hook): Update docstring. (eshell/which): Make extensible. (eshell--find-plain-lisp-command, eshell-plain-command--which): New functions. (eshell-plain-command): Use 'eshell--find-plain-lisp-command'. * lisp/eshell/esh-ext.el (eshell-explicit-command--which): New function... (eshell-explicit-command): ... unise it. (eshell-quoted-file-command--which): New function... (eshell-quoted-file-command): ... use it. (eshell-external-command--which): New function. * test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/which/plain/eshell-builtin) (esh-cmd-test/which/plain/external-program) (esh-cmd-test/which/plain/not-found, esh-cmd-test/which/alias) (esh-cmd-test/which/explicit, esh-cmd-test/which/explicit/not-found) (esh-cmd-test/which/quoted-file) (esh-cmd-test/which/quoted-file/not-found): New tests. * test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell-settings): Don't load or save aliases. (eshell-command-result--match,eshell-command-result--match-explainer) (eshell-command-result-match): New functions. |
||
|---|---|---|
| .. | ||
| em-alias.el | ||
| em-banner.el | ||
| em-basic.el | ||
| em-cmpl.el | ||
| em-dirs.el | ||
| em-elecslash.el | ||
| em-extpipe.el | ||
| em-glob.el | ||
| em-hist.el | ||
| em-ls.el | ||
| em-pred.el | ||
| em-prompt.el | ||
| em-rebind.el | ||
| em-script.el | ||
| em-smart.el | ||
| em-term.el | ||
| em-tramp.el | ||
| em-unix.el | ||
| em-xtra.el | ||
| esh-arg.el | ||
| esh-cmd.el | ||
| esh-ext.el | ||
| esh-io.el | ||
| esh-mode.el | ||
| esh-module.el | ||
| esh-opt.el | ||
| esh-proc.el | ||
| esh-util.el | ||
| esh-var.el | ||
| eshell.el | ||