Replace _values with compadd, and other cleanup recommended

Thanks @okapia!
This commit is contained in:
David Ross 2018-08-25 17:37:09 -07:00
parent c059bbdfe6
commit 9a215c194c
1 changed files with 4 additions and 2 deletions

View File

@ -42,8 +42,10 @@
# ------------------------------------------------------------------------------
_kak_sessions() {
session_ids=($(_call_program session_ids kak -l))
_values 'kak sessions' "${session_ids[@]}"
local -a session_ids expl
session_ids=($(_call_program session_names kak -l))
_description session-ids expl "session name"
compadd "$expl[@]" -a session_ids
}
_kak() {