]> arthur.barton.de Git - ax-zsh.git/commitdiff
New "hstr" plugin
authorAlexander Barton <alex@barton.de>
Wed, 22 Apr 2020 09:23:34 +0000 (11:23 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 22 Apr 2020 09:23:34 +0000 (11:23 +0200)
plugins/hstr/README.md [new file with mode: 0644]
plugins/hstr/hstr.zshrc [new file with mode: 0644]

diff --git a/plugins/hstr/README.md b/plugins/hstr/README.md
new file mode 100644 (file)
index 0000000..6380a6b
--- /dev/null
@@ -0,0 +1,21 @@
+## hstr
+
+Integrate *hstr*, a "bash and zsh shell history suggest box", into ZSH.
+
+### Usage
+
+This plugin uses the "hstr --show-configuration" itself to enable *hstr*
+functionality in ZSH.
+at the time of this writing, April 22 2020 using *fzf* 2.2.0, this is
+
+1. set "histignorespace" shell option,
+2. add "hh" alias,
+3. add Keybindings.
+
+### Command Aliases
+
+- `hh`: `hstr`
+
+### Key Bindings
+
+- `CTRL-R`: Paste the selected command from history into the command line.
diff --git a/plugins/hstr/hstr.zshrc b/plugins/hstr/hstr.zshrc
new file mode 100644 (file)
index 0000000..4bf1b46
--- /dev/null
@@ -0,0 +1,9 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# hstr.zshrc: Setup hstr
+
+axzsh_is_modern_terminal || return 91
+
+# Make sure that "hstr(1)" is installed
+(( $+commands[hstr] )) || return 1
+
+eval "$(hstr --show-configuration)"