1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-01-01 08:04:44 +01:00

refactor(1password): extract opswd function

This commit is contained in:
Marc Cornellà
2022-03-26 15:10:56 +01:00
parent 4dce175e0e
commit a64d940377
3 changed files with 53 additions and 44 deletions

9
plugins/1password/_opswd Normal file
View File

@@ -0,0 +1,9 @@
#compdef opswd
function _opswd() {
local -a services
services=("${(@f)$(op list items --categories Login 2>/dev/null | op get item - --fields title 2>/dev/null)}")
[[ -z "$services" ]] || compadd -a -- services
}
_opswd "$@"