diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2021-06-19 09:27:27 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2021-06-19 09:27:27 +0100 |
| commit | 01b48b3cd44cd08612c6b033b50feae2c96ff6e8 (patch) | |
| tree | f4331e09c669209b56b7448f930dd7d6286334c8 /zsh/functions | |
| parent | b77fe30d8784ee494ef69de887fd224bcc6d441b (diff) | |
zsh: Move the ‘vault’ function to dotfiles-darwin
Diffstat (limited to 'zsh/functions')
| -rw-r--r-- | zsh/functions/_vault | 3 | ||||
| -rw-r--r-- | zsh/functions/vault | 19 |
2 files changed, 0 insertions, 22 deletions
diff --git a/zsh/functions/_vault b/zsh/functions/_vault deleted file mode 100644 index 5cab4e5..0000000 --- a/zsh/functions/_vault +++ /dev/null @@ -1,3 +0,0 @@ -#compdef vault - -_arguments ": :(close open)" ": :_path_files" diff --git a/zsh/functions/vault b/zsh/functions/vault deleted file mode 100644 index 8196772..0000000 --- a/zsh/functions/vault +++ /dev/null @@ -1,19 +0,0 @@ -# -*- mode: sh -*- - -case $1 in - close) - hdiutil unmount -quiet $2 - ;; - open) - local session=$(op signin --raw) - if [[ -z ${session} ]]; then - return 1 - fi - op get item ${2:t} --fields password --session ${session} \ - | hdiutil attach -quiet -stdinpass $2 - op signout --session ${session} - ;; - *) - return 1 - ;; -esac |
