Skip to content

Commit 31df0fd

Browse files
committed
fzgit: branch detection doesnt need sed
1 parent e6c854e commit 31df0fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fzgit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fzf() {
5555
prompt="${1##*=}>"
5656
shift
5757
fi
58-
branch=$(git status 2> /dev/null | sed 's/On branch />/;q')
58+
branch=$(git rev-parse --abbrev-ref HEAD)
5959
opts=( --prompt="fzgit${branch}>${prompt} " )
6060
[[ -v FZGIT_OPTIONS ]] && opts=( $FZGIT_OPTIONS )
6161
command fzf "${opts[@]}" \

0 commit comments

Comments
 (0)