#compdef pnmscale local scale if [[ "$words[2]" = -* ]]; then scale=() else scale=( ':scale factor:' ) fi _arguments '-xsize:width:' '-width:width:' \ '-ysize:height:' '-height:height:' \ '-xscale:horizontal scale factor:' \ '-yscale:horizontal scale factor:' \ '-xysize:width::height:' "$scale[@]" \ ':file: _pbm_file'