Next: Scripts, Previous: Aliases, Up: Commands

### 3.4 History

Eshell knows a few built-in variables:

`$+`
  This variable always contains the current working directory.
`$-`
  This variable always contains the previous working directory (the current working directory from before the last `cd` command).
`$_`
  It refers to the last argument of the last command.
`$$`
  This is the result of the last command. In case of an external command, it is `t` or `nil`.
`$?`
  This variable contains the exit code of the last command (0 or 1 for Lisp functions, based on successful completion).