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 15:56:01 +08:00
|
|
|
\section history history - Show and manipulate command history
|
2012-06-05 12:24:42 +08:00
|
|
|
|
|
|
|
\subsection history-synopsis Synopsis
|
|
|
|
<pre>
|
|
|
|
history (--save | --clear)
|
2012-06-12 16:47:25 +08:00
|
|
|
history (--search | --delete ) (--prefix "prefix string" | --contains "search string")
|
2012-06-05 12:24:42 +08:00
|
|
|
</pre>
|
|
|
|
|
|
|
|
\subsection history-description Description
|
|
|
|
|
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 15:56:01 +08:00
|
|
|
\c history is used to list, search and delete the history of commands used.
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
The following options are available:
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
- \c --save saves all changes in the history file. The shell automatically
|
|
|
|
saves the history file; this option is provided for internal use.
|
|
|
|
- \c --clear clears the history file. A prompt is displayed before the history
|
|
|
|
is erased.
|
|
|
|
- \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.
|
|
|
|
- \c --contains searches or deletes items in the history that contain the
|
|
|
|
specified text string.
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
If \c --search is specified without \c --contains or <code>--prefix</code>,
|
|
|
|
\c --contains will be assumed.
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
If \c --delete is specified without \c --contains or <code>--prefix</code>,
|
|
|
|
only a history item which exactly matches the parameter will be erased. No
|
|
|
|
prompt will be given. If \c --delete is specified with either of these
|
|
|
|
parameters, an interactive prompt will be displayed before any items are
|
|
|
|
deleted.
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
\subsection history-examples Example
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
<code>history --clear</code> deletes all history items
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
<code>history --search --contains "foo"</code> outputs a list of all previous
|
|
|
|
commands containing the string "foo".
|
2012-06-05 12:24:42 +08: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 15:56:01 +08:00
|
|
|
<code>history --delete --prefix "foo"</code> interactively deletes the record
|
|
|
|
of previous commands which start with "foo".
|