diff --git a/Examples-(fish).md b/Examples-(fish).md index 043f152..f58da31 100644 --- a/Examples-(fish).md +++ b/Examples-(fish).md @@ -102,8 +102,9 @@ function fco -d "Fuzzy-find and checkout a branch" git branch --all | grep -v HEAD | string trim | fzf | read -l result; and git checkout "$result" end -function fco -d "Fuzzy-find and checkout a branch (alternate method)" - git for-each-ref --format='%(refname:short)' refs/heads | fzf --height 10% --layout=reverse --border | xargs git checkout +function fco -d "Use `fzf` to choose which branch to check out" --argument-names branch + set -q branch[1]; or set branch '' + git for-each-ref --format='%(refname:short)' refs/heads | fzf --height 10% --layout=reverse --border --query=$branch --select-1 | xargs git checkout end function fcoc -d "Fuzzy-find and checkout a commit"