X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=tmux%2Fbin%2Ftmux-fzf.zsh;fp=tmux%2Fbin%2Ftmux-fzf.zsh;h=0000000000000000000000000000000000000000;hb=947b45d4141f02e02155b73725b93acfb493c7c0;hp=2eff748fa4f987497a95db223907629a1f46ff0a;hpb=b35ac159155c45e2bfe037ea39f0ef66abeef5d4;p=dotfiles.git diff --git a/tmux/bin/tmux-fzf.zsh b/tmux/bin/tmux-fzf.zsh deleted file mode 100755 index 2eff748..0000000 --- a/tmux/bin/tmux-fzf.zsh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env zsh - -cd $2 -set -e -tmp=`mktemp` -trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT - -case $1 in -(find) - bfs -L . -mindepth 1 \ - -path "*/.git" -prune -o \ - -path "*/.redo" -prune -o \ - \( -type f -o -type d -o -type l \) -print | - cut -c3- | fzf -m --preview="less -N -S {}" | - while read fn ; do print ${(q)fn} ; done > $tmp - ;; -(git-files) git status --short | fzf -m | perl -npe 's/^\s*\S+\s+//' > $tmp ;; -(git-branches) { git branch ; git branch --remote } | fzf > $tmp ;; -(git-commits) - git --no-pager log --oneline -n 20 | perl -ne "print \"@~\$n \$_\"; \$n++" | - fzf --reverse | cut -w -f1 > $tmp - ;; -(*) echo unknown command ; sleep 1 ; exit ;; -esac - -[ -s $tmp ] || exit -tmux set-buffer "`perl -npe 's/\n/ /g' $tmp`" -tmux paste-buffer -tmux delete-buffer