Next: , Previous: Commands, Up: Top

4 Expansion

Expansion in a command shell is somewhat like macro expansion in macro parsers (such as cpp and m4), but in a command shell, they are less often used for constants, and usually for using variables and string manipulation.1 For example, $var on a line expands to the value of the variable var when the line is executed. Expansions are usually passed as arguments, but may also be used as commands.2


Footnotes

[1] Eshell has no string-manipulation expansions because the Elisp library already provides many functions for this.

[2] E.g., entering just ‘$var’ at the prompt is equivalent to entering the value of var at the prompt.