#compdef figlet _figlet() { local context state line local fontdir typeset -A opt_args fontdir=$(figlet -I2) _arguments -C -s \ "-c[center justify]" \ "-k[use kerning]" \ "-l[left justify]" \ "-n[normal mode]" \ "-o[let letters overlap]" \ "-p[paragraph mode]" \ "-r[right justify]" \ "-s[smushed spacing]" \ "-t[use terminal width]" \ "-v[version]" \ "-x[use default justification of font]" \ "-D[use Deutsch character set]" \ "-E[use English character set]" \ "-L[left-to-right]" \ "-N[clear controlfile list]" \ "-R[right-to-left]" \ "-S[smush letters together or else!]" \ "-W[wide spacing]" \ "-X[use default writing direction of font]" \ "-w+[output width]" \ "-d+[directory]:directory:_path_files -/" \ "-f+[font]:font:->change_font" \ "-C+[control file]:->change_controlfile" \ "-I+[info]:info:compadd 0 1 2 3 4" \ && return 0 (( $+opt_args[-d] )) && fontdir=$opt_args[-d] case $state in (change_font) _files -W $fontdir -g '*flf*' && return 0 ;; (change_controlfile) _files -W $fontdir -g '*flc*' && return 0 ;; esac return 1 } # this is going to be what I use as the basis for my article. # vim:sw=2 sts=2