aboutsummaryrefslogtreecommitdiff
path: root/completion/crypt.zsh
blob: 41f06c5e9e950c9666201509f380627f1123823f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#compdef crypt
#autoload

# copy to /usr/share/zsh/site-functions/_crypt

# TODO: edit & other actions
_crypt() {
	local IFS=$'\n'
	local location
	zstyle -s ":completion:${curcontext}:" location location || location="${CRYPT_PATH:-$HOME/.crypt}"
	_values -C 'entries' ${$(crypt list --plain 2>/dev/null | sed -e "s#\([^[:space:]]*\)[[:space:]]*\(.*\)#\1\[\2\]#g" | sort):-""}
}

_crypt