diff options
Diffstat (limited to 'etc/completions')
-rw-r--r-- | etc/completions/_fbi | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/etc/completions/_fbi b/etc/completions/_fbi index dd45c42..63e2d20 100644 --- a/etc/completions/_fbi +++ b/etc/completions/_fbi @@ -4,7 +4,6 @@ ## https://derf.homelinux.org/~derf/dotfiles/completion/_fbi typeset -a arguments -typeset expl lstate arguments=( -{1,once}"[don't loop]" @@ -17,7 +16,7 @@ arguments=( '-comments[display image comments]' -{d,device}'[set framebuffer device]:framebuffer device:_path_files -W /dev -g "fb*"' -{e,edit}'[enable editing]' - -{f,font}'[set font]:font:->font' + -{f,font}'[set font]:font:_font' '-fitwidth[zoom to width only]' -{g,gamma}'[gamma correction]:gamma: ' -{h,help}'[show help]' @@ -39,15 +38,9 @@ arguments=( _arguments -s $arguments -while [[ -n $state ]]; do - lstate=$state - state='' - case $lstate in - font) - typeset IFS=$'\n' - typeset -a fonts - _wanted font expl 'font' \ - compadd $(fc-list | cut -d ":" -f 1 2>&1) - ;; - esac -done +function _font () { + typeset IFS=$'\n' + typeset -a fonts + _wanted font expl 'font' \ + compadd $(fc-list | cut -d ":" -f 1 2>&1) +} |