]> Sergey Matveev's repositories - dotfiles.git/blobdiff - bin/bin/pe
Huge tmux-fzf simplification with files quoting
[dotfiles.git] / bin / bin / pe
index 8b64702a77f53de9de5150d9b83fc684eafd66dd..9777ecbde5c2309060dc423ca362c958b2b43630 100755 (executable)
@@ -1,29 +1,8 @@
 #!/bin/zsh
 
-exec >&2
-fns=()
-toprint=()
 typeset -A seen
-ctr=0
 path-extractor | while read fn ; do
     [[ $seen[$fn] -eq 1 ]] && continue
     seen+=($fn 1)
-    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
+    print $fn
+done | fzf -m