This commit is contained in:
Russell Hernandez Ruiz 2021-11-16 22:12:54 +00:00 committed by GitHub
commit 0587e7829a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
function _abduco() {
case $2 in
-*) # Option
COMPREPLY=($(compgen -W ' \
-n -nf \
-c -cf -cr \
-f -fn -fc -fcr \
-A -Ar \
-a -ar \
-l -lr \
-r -rc -rcf -rA -ra -rl \
-e -e^ \
-v \
' -- $2))
;;
*) # Session
local sessions=$(abduco | tail -n+2 | cut -f 3)
COMPREPLY=($(compgen -W "$sessions" -- $2))
[ -n "$2" ] && compopt -o plusdirs
;;
esac
}
command -F _abduco abduco