mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-08 04:30:45 -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-tests.el | ||
| em-basic-tests.el | ||
| em-cmpl-tests.el | ||
| em-dirs-tests.el | ||
| em-extpipe-tests.el | ||
| em-glob-tests.el | ||
| em-hist-tests.el | ||
| em-ls-tests.el | ||
| em-pred-tests.el | ||
| em-prompt-tests.el | ||
| em-script-tests.el | ||
| em-tramp-tests.el | ||
| em-unix-tests.el | ||
| esh-arg-tests.el | ||
| esh-cmd-tests.el | ||
| esh-ext-tests.el | ||
| esh-io-tests.el | ||
| esh-opt-tests.el | ||
| esh-proc-tests.el | ||
| esh-util-tests.el | ||
| esh-var-tests.el | ||
| eshell-tests-helpers.el | ||
| eshell-tests-unload.el | ||
| eshell-tests.el | ||