mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
remove bash fuzzy
This commit is contained in:
parent
84532e17d6
commit
23c84ca606
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
gcb() {
|
||||
result=$(git branch -a --color=always | grep -v '/HEAD\s' | sort |
|
||||
fzf --height 50% --border --ansi --tac --preview-window right:70% \
|
||||
--preview 'git log --oneline --graph --date=short --pretty=\"format:%C(auto)%cd %h%d %s\" $(sed s/^..// <<< {} | cut -d\" \" -f1) | head -'$LINES |
|
||||
sed 's/^..//' | cut -d' ' -f1)
|
||||
|
||||
if [[ $result != "" ]]; then
|
||||
if [[ $result == remotes/* ]]; then
|
||||
git checkout --track $(echo $result | sed 's#remotes/##')
|
||||
else
|
||||
git checkout "$result"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
gcb
|
Loading…
Reference in New Issue
Block a user