Permalink
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (20 sloc) 448 Bytes
_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