mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 18:00:40 -08:00
During completion, we want to evaluate most Eshell forms (e.g. variable references), but skip others (e.g. globbing, subcommands). For globbing, we want to pass the literal glob to Pcomplete so it can use the glob for selecting completion candidates. For subcommands (including Lisp forms), we especially want to avoid evaluation, since they can produce arbitary side effects! (Bug#50470) * lisp/eshell/esh-cmd.el (eshell-allow-commands): New variable... (eshell-commands-forbidden): New error... (eshell-named-command, eshell-lisp-command): ... use them. * lisp/eshell/em-cmpl.el (eshell-complete--eval-argument-form): Disallow command forms and handle errors ourselves. (eshell-complete-parse-arguments): Don't parse glob characters. * test/lisp/eshell/em-cmpl-tests.el (em-cmpl-test/parse-arguments/unevaluated-subcommand) (em-cmpl-test/parse-arguments/unevaluated-lisp-form) (em-cmpl-test/parse-arguments/unevaluated-inner-subcommand) (em-cmpl-test/file-completion/glob, em-cmpl-test/command-completion) (em-cmpl-test/subcommand-completion): New tests. (em-cmpl-test/parse-arguments/pipeline): Remove superfluous let-binding. (em-cmpl-test/file-completion/after-list): Use a list variable rather than a subexpression; the latter is no longer evaluated during completion. (em-cmpl-test/lisp-function-completion): Check "$(func)" syntax. |
||
|---|---|---|
| .. | ||
| 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 | ||