Merge pull request #517 from lenormf/_kak
src _kak: Fix argument syntax and use `_call_program`
This commit is contained in:
commit
97ae4a914e
11
src/_kak
11
src/_kak
|
@ -42,12 +42,8 @@
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
_kak_sessions() {
|
_kak_sessions() {
|
||||||
session_ids=""
|
session_ids=($(_call_program session_ids kak -l))
|
||||||
for session_id in $(kak -l); do
|
_values "${session_ids[@]}"
|
||||||
session_ids="${session_ids} '${session_id}'"
|
|
||||||
done
|
|
||||||
|
|
||||||
eval "_values ${session_ids}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_kak() {
|
_kak() {
|
||||||
|
@ -56,8 +52,7 @@ _kak() {
|
||||||
'-l[list existing sessions]:session_id:_kak_sessions' \
|
'-l[list existing sessions]:session_id:_kak_sessions' \
|
||||||
'-clear[clear dead sessions]' \
|
'-clear[clear dead sessions]' \
|
||||||
'-ro[readonly mode]' \
|
'-ro[readonly mode]' \
|
||||||
'-help[display a help message and quit]' \
|
'(-help --help)'{-help,--help}'[display a help message and quit]' \
|
||||||
'--help[display a help message and quit]' \
|
|
||||||
'-d[run as a headless session (requires -s)]' \
|
'-d[run as a headless session (requires -s)]' \
|
||||||
'-q[in filter mode, be quiet about errors applying keys]' \
|
'-q[in filter mode, be quiet about errors applying keys]' \
|
||||||
'-c[connect to given session]:session_id:_kak_sessions' \
|
'-c[connect to given session]:session_id:_kak_sessions' \
|
||||||
|
|
Loading…
Reference in New Issue