Skip to content

Commit ad27d58

Browse files
committed
WIP: 'abduco' completion
1 parent 0b3403e commit ad27d58

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

share/completion/abduco

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# (C) 2025 unrealapex
2+
3+
# Completion script for abduco
4+
5+
function completion/abduco {
6+
7+
typeset OPTIONS ARGOPT PREFIX
8+
OPTIONS=( #>#
9+
"v; print version information to standard output and exit"
10+
"r; readonly session"
11+
"e; set the key to detach"
12+
"f; force creation of session when there is already terminated session of the same name"
13+
"c; create a new session and attach to it"
14+
"n; create a new session but do not attach to it"
15+
"A; try to connect to an existing session, upon failure create said session and attach to it"
16+
"a; attach to an existing session"
17+
"l; attach with the lowest priority"
18+
) #<#
19+
20+
command -f completion//parseoptions -es
21+
case $ARGOPT in
22+
(-)
23+
command -f completion//completeoptions
24+
;;
25+
(-A|-a)
26+
# FIXME: figure out why this isn't completing
27+
complete -P "$PREFIX" -- $(abduco | tail -n+2 | awk '{print $NF}')
28+
;;
29+
esac
30+
31+
}
32+
33+
# vim: set ft=sh ts=8 sts=8 sw=8 et:

0 commit comments

Comments
 (0)