]> Sergey Matveev's repositories - dotfiles.git/blob - tmux/.tmux/bin/fzf.zsh
Make zathura configuration file aware
[dotfiles.git] / tmux / .tmux / bin / fzf.zsh
1 #!/usr/bin/env zsh
2
3 cd $2
4 setopt ERR_EXIT
5 fpath=(~/.tmux/functions.zsh $fpath)
6 autoload tmux-fzf-$1
7 tmp=`mktemp`
8 trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
9 tmux-fzf-$1 > $tmp || { echo unknown command ; sleep 1 ; exit }
10 [[ -s $tmp ]] || exit
11 tmux set-buffer "`perl -npe 's/\n/ /g' $tmp`"
12 tmux paste-buffer
13 tmux delete-buffer