Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
\section history history - Show and manipulate command history
|
2012-06-05 04:24:42 +00:00
|
|
|
|
|
|
|
\subsection history-synopsis Synopsis
|
|
|
|
<pre>
|
2014-07-25 17:08:21 +00:00
|
|
|
history (--save | --clear | --merge)
|
2012-06-12 08:47:25 +00:00
|
|
|
history (--search | --delete ) (--prefix "prefix string" | --contains "search string")
|
2012-06-05 04:24:42 +00:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
\subsection history-description Description
|
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
`history` is used to list, search and delete the history of commands used.
|
2012-06-05 04:24:42 +00:00
|
|
|
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
The following options are available:
|
2012-06-05 04:24:42 +00:00
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
- `--save` saves all changes in the history file. The shell automatically
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
saves the history file; this option is provided for internal use.
|
2014-08-01 02:37:32 +00:00
|
|
|
- `--clear` clears the history file. A prompt is displayed before the history
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
is erased.
|
2014-07-25 17:08:21 +00:00
|
|
|
- \c --merge immediately incorporates history changes from other sessions. Ordinarily
|
|
|
|
fish ignores history changes from sessions started after the current one. This command
|
|
|
|
applies those changes immediately.
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
- \c --search returns history items in keeping with the \c --prefix or
|
|
|
|
\c --contains options.
|
|
|
|
- \c --delete deletes history items.
|
|
|
|
- \c --prefix searches or deletes items in the history that begin with the
|
|
|
|
specified text string.
|
2014-08-01 02:37:32 +00:00
|
|
|
- `--contains` searches or deletes items in the history that contain the
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
specified text string.
|
2012-06-05 04:24:42 +00:00
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
If `--search` is specified without `--contains` or `--prefix`,
|
|
|
|
`--contains` will be assumed.
|
2012-06-05 04:24:42 +00:00
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
If `--delete` is specified without `--contains` or `--prefix`,
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
only a history item which exactly matches the parameter will be erased. No
|
2014-08-01 02:37:32 +00:00
|
|
|
prompt will be given. If `--delete` is specified with either of these
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
parameters, an interactive prompt will be displayed before any items are
|
|
|
|
deleted.
|
2012-06-05 04:24:42 +00:00
|
|
|
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
\subsection history-examples Example
|
2012-06-05 04:24:42 +00:00
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
`history --clear` deletes all history items
|
2012-06-05 04:24:42 +00:00
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
`history --search --contains "foo"` outputs a list of all previous
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
commands containing the string "foo".
|
2012-06-05 04:24:42 +00:00
|
|
|
|
2014-08-01 02:37:32 +00:00
|
|
|
`history --delete --prefix "foo"` interactively deletes the record
|
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 07:56:01 +00:00
|
|
|
of previous commands which start with "foo".
|