summaryrefslogtreecommitdiff
path: root/plugins/history
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/history')
-rw-r--r--plugins/history/README.md20
-rw-r--r--plugins/history/history.plugin.zsh9
2 files changed, 13 insertions, 16 deletions
diff --git a/plugins/history/README.md b/plugins/history/README.md
index dd9286894..a9d480f46 100644
--- a/plugins/history/README.md
+++ b/plugins/history/README.md
@@ -1,15 +1,17 @@
-## history
+# history plugin
Provides a couple of convenient aliases for using the `history` command to examine your command line history.
-### Requirements
+To use it, add `history` to the plugins array in your zshrc file:
-* None.
+```zsh
+plugins=(... history)
+```
-### Usage
+## Aliases
-* If `h` is called, your command history is listed. Equivalent to using `history`
-
-* If `hsi` is called with an argument, a **case insensitive** `grep` search is performed on your command history, looking for commands that match the argument provided
-
-* If `hsi` is called without an argument you will help on `grep` arguments \ No newline at end of file
+| Alias | Command | Description |
+|-------|----------------------|------------------------------------------------------------------|
+| `h` | `history` | Prints your command history |
+| `hs` | `history \| grep` | Use grep to search your command history |
+| `hsi` | `history \| grep -i` | Use grep to do a case-insensitive search of your command history |
diff --git a/plugins/history/history.plugin.zsh b/plugins/history/history.plugin.zsh
index 0f4aa4b10..9cee48fe4 100644
--- a/plugins/history/history.plugin.zsh
+++ b/plugins/history/history.plugin.zsh
@@ -1,8 +1,3 @@
alias h='history'
-
-function hs
-{
- history | grep $*
-}
-
-alias hsi='hs -i'
+alias hs='history | grep'
+alias hsi='history | grep -i'