summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bianco <iloveitaly@gmail.com>2021-05-12 14:47:06 -0600
committerGitHub <noreply@github.com>2021-05-12 20:47:06 +0000
commitf041d7fe4a46fe651ccc4f648584f4cf0aa30988 (patch)
tree93175c6d5123ad8bf1a05c51d8aa34f2c5fb0165
parentfd90bd3413e929ef6416e45c2bdbc404ddf52cc7 (diff)
Adding plugin for zsh (#117)
* Adding plugin for zsh * plugin manager documentation
-rw-r--r--README.md6
-rw-r--r--atuin.plugin.zsh5
2 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 795cbdc3..a5b29342 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,12 @@ the install script, this should all be done for you!
echo 'eval "$(atuin init zsh)"' >> ~/.zshrc
```
+Or using a plugin manager:
+
+```
+zinit load ellie/atuin
+```
+
### bash
We need to setup some hooks, so first install bash-preexec:
diff --git a/atuin.plugin.zsh b/atuin.plugin.zsh
new file mode 100644
index 00000000..f0995ecf
--- /dev/null
+++ b/atuin.plugin.zsh
@@ -0,0 +1,5 @@
+local FOUND_ATUIN=$+commands[atuin]
+
+if [[ $FOUND_ATUIN -eq 1 ]]; then
+ source <(atuin init zsh)
+fi