Bash completion

This commit is contained in:
Vulcalien 2021-09-09 01:04:42 +02:00
parent b0cae43512
commit 40a2bb3843
1 changed files with 14 additions and 0 deletions

14
completion/bash Normal file
View File

@ -0,0 +1,14 @@
# bash completion for terminator -*- shell-script -*-
_terminator()
{
local cur prev words cword
_init_completion || return
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