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:
9
plugins/1password/_opswd
Normal file
9
plugins/1password/_opswd
Normal 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 "$@"
|
||||
Reference in New Issue
Block a user