From f041d7fe4a46fe651ccc4f648584f4cf0aa30988 Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Wed, 12 May 2021 14:47:06 -0600 Subject: [PATCH] Adding plugin for zsh (#117) * Adding plugin for zsh * plugin manager documentation --- README.md | 6 ++++++ atuin.plugin.zsh | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 atuin.plugin.zsh 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