Skip to content

Commit f9e2061

Browse files
committed
Add completion for sb()
1 parent 8d98740 commit f9e2061

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.zshrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,18 @@ fi
775775
# End of lines added by compinstall
776776
# ---------------------------------------------
777777

778+
# Completion for sb() — completes first arg with nono profile names.
779+
_sb() {
780+
if (( CURRENT == 2 )); then
781+
local -a profiles
782+
profiles=(~/.config/nono/profiles/*.json(N:t:r))
783+
_describe 'nono profile' profiles
784+
else
785+
_files
786+
fi
787+
}
788+
compdef _sb sb
789+
778790
# Ignore useless files, like .pyc.
779791
zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/).pyc'
780792

0 commit comments

Comments
 (0)