mirror of
https://github.com/kazhala/dotbare
synced 2024-11-19 15:25:46 +00:00
10 lines
424 B
Plaintext
10 lines
424 B
Plaintext
|
#!/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"
|