Added bash completion.
This commit is contained in:
parent
e0f8905ce5
commit
1ff28dd4dc
|
@ -0,0 +1,23 @@
|
|||
_diakonos()
|
||||
{
|
||||
local cur prev opts base
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
opts="-s"
|
||||
|
||||
case "${prev}" in
|
||||
-s)
|
||||
local sessions=$(ls "${HOME}/.diakonos/sessions")
|
||||
COMPREPLY=( $(compgen -W "${sessions}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
COMPREPLY=($(compgen -f -- ${cur}))
|
||||
return 0
|
||||
}
|
||||
complete -F _diakonos diakonos
|
Loading…
Reference in New Issue