Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function peco_select_branch
set -l query (commandline)
if test -n $query
set peco_flags --query "$query"
end
git branch | peco --prompt "GIT BRANCH>" $peco_flags | sed -e "s/^\* //g" -e "s/^ //g" | read line
if [ $line ]
git checkout $line
commandline -f repaint
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.