File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -583,6 +583,12 @@ of familiarity.
583
583
Expands to the value bound to @code {var }. This is the main way to use
584
584
variables in command invocations.
585
585
586
+ @item $"var"
587
+ @item $'var'
588
+ Expands to the value bound to @code {var }. This is useful to
589
+ disambiguate the variable name when concatenating it with another
590
+ value, such as @samp {$"var"-suffix }.
591
+
586
592
@item $#var
587
593
Expands to the length of the value bound to @code {var }. Raises an error
588
594
if the value is not a sequence
@@ -597,6 +603,11 @@ it can be used in a string, such as @samp{/some/path/$(lisp).txt}.
597
603
Returns the output of @command {command }, which can be any valid Eshell
598
604
command invocation, and may even contain expansions.
599
605
606
+ @item $<command>
607
+ As with @samp {$ @{ command @} }, evaluates the Eshell command invocation
608
+ @command {command }, but writes the output to a temporary file and
609
+ returns the file name.
610
+
600
611
@item $var[i]
601
612
Expands to the @code {i }th element of the value bound to @code {var }. If
602
613
the value is a string, it will be split at whitespace to make it a list.
Original file line number Diff line number Diff line change 34
34
; ;
35
35
; ; "-" is a valid part of a variable name.
36
36
; ;
37
- ; ; $<MYVAR>-TOO
37
+ ; ; $\"MYVAR\"-TOO
38
+ ; ; $'MYVAR'-TOO
38
39
; ;
39
40
; ; Only "MYVAR" is part of the variable name in this case.
40
41
; ;
55
56
; ; Returns the value of an eshell subcommand. See the note above
56
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
64
; ; $ANYVAR[10]
59
65
; ;
60
66
; ; Return the 10th element of ANYVAR. If ANYVAR's value is a string,
@@ -426,9 +432,12 @@ variable.
426
432
Possible options are:
427
433
428
434
NAME an environment or Lisp variable value
429
- <LONG-NAME> disambiguates the length of the name
435
+ \" LONG-NAME\" disambiguates the length of the name
436
+ 'LONG-NAME' as above
430
437
{COMMAND} result of command is variable's value
431
- (LISP-FORM) result of Lisp form is variable's value"
438
+ (LISP-FORM) result of Lisp form is variable's value
439
+ <COMMAND> write the output of command to a temporary file;
440
+ result is the file name"
432
441
(cond
433
442
((eq (char-after ) ?{ )
434
443
(let ((end (eshell-find-delimiter ?\{ ?\} )))
You can’t perform that action at this time.
0 commit comments