diff options
| author | Federico Angelilli <code@fedang.net> | 2023-12-22 17:18:34 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2023-12-22 17:18:34 +0100 |
| commit | 1c39c97e8c416ba33aa3ae884354966609c84476 (patch) | |
| tree | bf91c9f93994359d02bd90c7681fa53c99e9205d /extra/crypt.zsh | |
| parent | 096deb6b1b038889f4bfb899a849e31d50272225 (diff) | |
Add GPLv3 license and INSTALL
Diffstat (limited to 'extra/crypt.zsh')
| -rwxr-xr-x | extra/crypt.zsh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extra/crypt.zsh b/extra/crypt.zsh new file mode 100755 index 0000000..2e1e57a --- /dev/null +++ b/extra/crypt.zsh @@ -0,0 +1,13 @@ +#compdef crypt +#autoload + +# copy to /usr/share/zsh/site-functions/_crypt + +_crypt() { + local IFS=$'\n' + local location + zstyle -s ":completion:${curcontext}:" location location || location="${CRYPT_PATH:-$HOME/.crypt}" + _values -C 'entries' ${$(crypt list --plain | sed -e "s#\([^[:space:]]*\)[[:space:]]*\(.*\)#\1\[\2\]#g" | sort):-""} +} + +_crypt |
