Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify hoard.zsh #350

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,20 @@ Either install it with `nix-env -iA hoard`, get it temporarily with `nix-shell -

<a name="usage"/>

## 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
Expand Down
12 changes: 1 addition & 11 deletions src/shell/hoard.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down