mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-19 02:02:32 +01:00
refactor(1password): extract opswd function
This commit is contained in:
parent
4dce175e0e
commit
a64d940377
3 changed files with 53 additions and 44 deletions
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 "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue