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