diff options
| author | Stefan Kangas | 2022-03-02 06:33:19 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-03-02 06:33:19 +0100 |
| commit | 6d78321ce824ede11ab04d976d46487bcd191cab (patch) | |
| tree | e1f511f01c224bea7b70d1f4db52ccee5331b34a /lisp/eshell | |
| parent | 2b130bd944a36510043750286106a16a1e2ad7c4 (diff) | |
| parent | 9dadcbe4297fdd52e2664e99fe693ba35a51eb57 (diff) | |
| download | emacs-6d78321ce824ede11ab04d976d46487bcd191cab.tar.gz emacs-6d78321ce824ede11ab04d976d46487bcd191cab.zip | |
Merge from origin/emacs-28
9dadcbe429 ; * doc/misc/eshell.texi (Dollars Expansion): Fix markup.
2c3d1b6bf4 Improve/correct documentation about Eshell variable expansion
9e257aecc9 Partially revert b03f74e0f2a578b1580e8b1c368665850ee7f808
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/esh-var.el | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 5c8dacd980e..ee3ffbc6475 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el | |||
| @@ -34,7 +34,8 @@ | |||
| 34 | ;; | 34 | ;; |
| 35 | ;; "-" is a valid part of a variable name. | 35 | ;; "-" is a valid part of a variable name. |
| 36 | ;; | 36 | ;; |
| 37 | ;; $<MYVAR>-TOO | 37 | ;; $\"MYVAR\"-TOO |
| 38 | ;; $'MYVAR'-TOO | ||
| 38 | ;; | 39 | ;; |
| 39 | ;; Only "MYVAR" is part of the variable name in this case. | 40 | ;; Only "MYVAR" is part of the variable name in this case. |
| 40 | ;; | 41 | ;; |
| @@ -55,6 +56,11 @@ | |||
| 55 | ;; Returns the value of an eshell subcommand. See the note above | 56 | ;; Returns the value of an eshell subcommand. See the note above |
| 56 | ;; regarding Lisp evaluations. | 57 | ;; regarding Lisp evaluations. |
| 57 | ;; | 58 | ;; |
| 59 | ;; $<command> | ||
| 60 | ;; | ||
| 61 | ;; Evaluates an eshell subcommand, redirecting the output to a | ||
| 62 | ;; temporary file, and returning the file name. | ||
| 63 | ;; | ||
| 58 | ;; $ANYVAR[10] | 64 | ;; $ANYVAR[10] |
| 59 | ;; | 65 | ;; |
| 60 | ;; Return the 10th element of ANYVAR. If ANYVAR's value is a string, | 66 | ;; Return the 10th element of ANYVAR. If ANYVAR's value is a string, |
| @@ -423,9 +429,12 @@ variable. | |||
| 423 | Possible options are: | 429 | Possible options are: |
| 424 | 430 | ||
| 425 | NAME an environment or Lisp variable value | 431 | NAME an environment or Lisp variable value |
| 426 | <LONG-NAME> disambiguates the length of the name | 432 | \"LONG-NAME\" disambiguates the length of the name |
| 433 | 'LONG-NAME' as above | ||
| 427 | {COMMAND} result of command is variable's value | 434 | {COMMAND} result of command is variable's value |
| 428 | (LISP-FORM) result of Lisp form is variable's value" | 435 | (LISP-FORM) result of Lisp form is variable's value |
| 436 | <COMMAND> write the output of command to a temporary file; | ||
| 437 | result is the file name" | ||
| 429 | (cond | 438 | (cond |
| 430 | ((eq (char-after) ?{) | 439 | ((eq (char-after) ?{) |
| 431 | (let ((end (eshell-find-delimiter ?\{ ?\}))) | 440 | (let ((end (eshell-find-delimiter ?\{ ?\}))) |
| @@ -457,8 +466,12 @@ Possible options are: | |||
| 457 | (eshell-as-subcommand ,(eshell-parse-command cmd)) | 466 | (eshell-as-subcommand ,(eshell-parse-command cmd)) |
| 458 | (ignore | 467 | (ignore |
| 459 | (nconc eshell-this-command-hook | 468 | (nconc eshell-this-command-hook |
| 460 | (list (lambda () | 469 | ;; Quote this lambda; it will be evaluated |
| 461 | (delete-file ,temp))))) | 470 | ;; by `eshell-do-eval', which requires very |
| 471 | ;; particular forms in order to work | ||
| 472 | ;; properly. See bug#54190. | ||
| 473 | (list (function (lambda () | ||
| 474 | (delete-file ,temp)))))) | ||
| 462 | (quote ,temp))) | 475 | (quote ,temp))) |
| 463 | (goto-char (1+ end))))))) | 476 | (goto-char (1+ end))))))) |
| 464 | ((eq (char-after) ?\() | 477 | ((eq (char-after) ?\() |