aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/history.txt
diff options
context:
space:
mode:
authorGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-19 13:41:23 +0100
committerGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-19 13:41:23 +0100
commit4651919bd8cbd397b1ef2c48020e37f376026976 (patch)
treeb4cf5fb6c2b8ca92d74f7904ea91ab0273dc3e8e /doc_src/history.txt
parentfed4bb5c073939c4772d32ce0519ebf0a4ebdae8 (diff)
Make line length, wrapping and spacing consistent
Diffstat (limited to 'doc_src/history.txt')
-rw-r--r--doc_src/history.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/doc_src/history.txt b/doc_src/history.txt
index 396e4d2e..dbcd258a 100644
--- a/doc_src/history.txt
+++ b/doc_src/history.txt
@@ -12,23 +12,33 @@ history (--search | --delete) [--prefix "prefix string" | --contains "search str
The following options are available:
- `--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.
+
- `--save` saves all changes in the history file. The shell automatically saves the history file; this option is provided for internal use.
+
- `--clear` clears the history file. A prompt is displayed before the history is erased.
+
- `--search` returns history items in keeping with the `--prefix` or `--contains` options.
+
- `--delete` deletes history items.
+
- `--prefix` searches or deletes items in the history that begin with the specified text string.
+
- `--contains` searches or deletes items in the history that contain the specified text string.
If `--search` is specified without `--contains` or `--prefix`, `--contains` will be assumed.
If `--delete` is specified without `--contains` or `--prefix`, only a history item which exactly matches the parameter will be erased. No prompt will be given. If `--delete` is specified with either of these parameters, an interactive prompt will be displayed before any items are deleted.
+
\subsection history-examples Example
-`history --clear` deletes all history items
+\fish
+history --clear
+# Deletes all history items
-`history --search --contains "foo"` outputs a list of all previous
-commands containing the string "foo".
+history --search --contains "foo"
+# Outputs a list of all previous commands containing the string "foo".
-`history --delete --prefix "foo"` interactively deletes the record
-of previous commands which start with "foo".
+history --delete --prefix "foo"
+# Interactively deletes the record of previous commands which start with "foo".
+\endfish