]> Sergey Matveev's repositories - dotfiles.git/blob - tmux/bin/tmux-git-extractor.sh
Gemini requires SNI
[dotfiles.git] / tmux / bin / tmux-git-extractor.sh
1 #!/bin/sh
2
3 tmux has-session -t git-extractor && tmux kill-session -t git-extractor || :
4 tmux new-session -d -s git-extractor -c "$1" '
5     git status --short | fzf -m --preview="" | while read item ; do
6         item=`echo $item | cut -w -f2-`
7         echo -n "$item "
8     done | read data
9     tmux set-buffer "$data"
10     tmux detach
11 '
12 tmux set-option -t git-extractor status off
13 exec tmux attach-session -t git-extractor