mirror of https://github.com/kazhala/dotbare
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
424 B
Plaintext
10 lines
424 B
Plaintext
5 years ago
|
#!/bin/bash
|
||
|
selected_stash=$(/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME stash list | \
|
||
|
fzf --exit-0 --preview "echo {} | sed 's/://g' | awk '{print \$1}' | \
|
||
|
xargs -I __ /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME stash show -p __ --color" | \
|
||
|
sed 's/://g' | awk '{print $1}')
|
||
|
|
||
|
[[ -z "$selected_stash" ]] && exit 0
|
||
|
|
||
|
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME stash apply "$selected_stash"
|