6 trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
11 -path "*/.git" -prune -o \
12 -path "*/.redo" -prune -o \
13 \( -type f -o -type d -o -type l \) -print |
14 cut -c3- | fzf -m --preview="less -N -S {}" |
15 while read fn ; do print ${(q)fn} ; done > $tmp
19 tmux save-buffer $tmp.capture
20 trap "rm -f $tmp.capture" HUP PIPE INT QUIT TERM EXIT
22 pe < $tmp.capture > $tmp
24 (git-files) git status --short | fzf -m | perl -npe 's/^\s*\S+\s+//' > $tmp ;;
25 (git-branches) { git branch ; git branch --remote } | fzf > $tmp ;;
27 git --no-pager log --oneline -n 20 | perl -ne "print \"@~\$n \$_\"; \$n++" |
28 fzf --reverse | cut -w -f1 > $tmp
30 (*) echo unknown command ; sleep 1 ; exit ;;
34 tmux set-buffer "`perl -npe 's/\n/ /g' $tmp`"