diff --git a/README.md b/README.md index d785ff0..aec87e3 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,20 @@ Either install it with `nix-env -iA hoard`, get it temporarily with `nix-shell - +## Configure +You can change the location or name of the config file by setting `HOARD_CONFIG` to a directory path **or** a file path. + +```sh +export HOARD_CONFIG="~/.zsh/config/plugins/hoard_config.yml" +``` +or + + +This will default to `config.yml` +```sh +export HOARD_CONFIG="~/.zsh/config/plugins/hoard" +``` + ## 🤸 Usage #### Save a new command diff --git a/src/shell/hoard.zsh b/src/shell/hoard.zsh index c259b96..6aca1e7 100644 --- a/src/shell/hoard.zsh +++ b/src/shell/hoard.zsh @@ -10,19 +10,9 @@ autoload -U add-zsh-hook _hoard_list(){ - emulate -L zsh - zle -I - - echoti rmkx # Similar to bash plugin in hoard.bash output=$(hoard --autocomplete list 3>&1 1>&2 2>&3) - echoti smkx - - if [[ -n $output ]] ; then - LBUFFER=$output - fi - - zle reset-prompt + print -z $output } zle -N _hoard_list_widget _hoard_list