mirror of
https://github.com/jimeh/git-aware-prompt.git
synced 2026-02-18 21:26:39 +00:00
Ensure consistent code style and indentation
This commit is contained in:
21
prompt.sh
21
prompt.sh
@@ -1,15 +1,14 @@
|
|||||||
find_git_branch() {
|
find_git_branch() {
|
||||||
local branch
|
# Based on: http://stackoverflow.com/a/13003854/170413
|
||||||
# Based on: http://stackoverflow.com/a/13003854/170413
|
local branch
|
||||||
if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
|
if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null); then
|
||||||
then
|
if [[ "$branch" == "HEAD" ]]; then
|
||||||
if [[ "$branch" == "HEAD" ]]; then
|
branch='detached*'
|
||||||
branch='(detached head)'
|
fi
|
||||||
fi
|
git_branch="($branch)"
|
||||||
git_branch="($branch)"
|
else
|
||||||
else
|
git_branch=""
|
||||||
git_branch=""
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
find_git_dirty() {
|
find_git_dirty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user