# vi: ft=bash _tofi() { local cur prev words cword _init_completion || return words=( --help --config --output --anchor --background-color --corner-radius --font --font-size --num-results --selection-color --selection-padding --selection-background --outline-width --outline-color --prompt-text --result-spacing --min-input-width --border-width --border-color --text-color --width --height --margin-top --margin-bottom --margin-left --margin-right --padding-top --padding-bottom --padding-left --padding-right --horizontal --hide-cursor --history --drun-launch --drun-print-exec --hint-font --late-keyboard-init ) case "${prev}" in --font) ;& --config|-c) _filedir return 0 ;; --help|-h) ;; --late-keyboard-init) ;; --*) return 0 ;; esac case "${cur}" in -[ch]) COMPREPLY=($cur) ;; *) COMPREPLY=($(compgen -W "${words[*]}" -- ${cur})) return 0 ;; esac } complete -F _tofi tofi complete -F _tofi tofi-run complete -F _tofi tofi-drun