- fns+=($fn)
- toprint+=(`printf "%X:%s" $ctr "${fn}"`)
- ctr=$(( $ctr + 1 ))
-done
-[[ $ctr -le 20 ]] && print -C 1 $toprint || print -c $toprint
-print -n "> "
-read choice < /dev/tty
-[[ "$choice" = "q" ]] && exit
-if [[ "$choice" = "*" ]]; then
- buf=$fns
-else
- buf=()
- for c in ${=choice} ; do
- fn=$fns[$(( 1 + 16#$c ))]
- buf+=($fn)
- done
-fi
-print $buf
-print -n $buf | xclip -in -selection clipboard