817f820cfb
Bash completion is also added for --profile and --layout but it won't work if the profile/layout has quotes or spaces in the name.
28 lines
675 B
Bash
28 lines
675 B
Bash
# bash completion for terminator -*- shell-script -*-
|
|
|
|
_terminator()
|
|
{
|
|
local cur prev words cword
|
|
_init_completion || return
|
|
|
|
case $prev in
|
|
--profile | -p)
|
|
COMPREPLY=($(compgen -W "$($1 --list-profiles)"\
|
|
-- "$cur"))
|
|
return
|
|
;;
|
|
--layout | -l)
|
|
COMPREPLY=($(compgen -W "$($1 --list-layouts)"\
|
|
-- "$cur"))
|
|
return
|
|
;;
|
|
esac
|
|
|
|
COMPREPLY=($(compgen -W "$($1 --help | tr ',' '\n' |
|
|
command sed -n -e 's/^ *\(--\?[a-zA-Z\-]\+=\?\).*/\1/p')"\
|
|
-- "$cur"))
|
|
} &&
|
|
complete -F _terminator terminator
|
|
|
|
# ex: filetype=sh
|