Skip to content

Commit

Permalink
Merge branch 'master' of github.com:maddingo/bash-git-prompt into mad…
Browse files Browse the repository at this point in the history
…dingo-master

Conflicts:
	gitprompt.sh
  • Loading branch information
magicmonty committed Jul 3, 2013
2 parents 71ab709 + f36da50 commit 31773c1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gitprompt.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/sh

# assume the gitstatus.py is in the same directory as this script
# code thanks to http://stackoverflow.com/questions/59895
if [ -z "${__GIT_PROMPT_DIR}" ]; then
SOURCE="${BASH_SOURCE[0]}"
while [ -h "${SOURCE}" ]; do
DIR="$( cd -P "$( dirname "${SOURCE}" )" && pwd )"
SOURCE="$(readlink "${SOURCE}")"
[[ $SOURCE != /* ]] && SOURCE="${DIR}/${SOURCE}"
done
__GIT_PROMPT_DIR="$( cd -P "$( dirname "${SOURCE}" )" && pwd )"
fi

function git_prompt_config()
{
# Colors
Expand Down Expand Up @@ -34,7 +46,9 @@ function git_prompt_config()
GIT_PROMPT_CLEAN="${BoldGreen}"

# Various variables you might want for your PS1 prompt instead
local Time12a="\@"
local Time12a="\$(date +%H:%M)"
# local Time12a="(\$(date +%H:%M:%S))"
# local Time12a="(\@))"
local PathShort="\w"

PROMPT_START="${Yellow}${PathShort}${ResetColor}"
Expand Down

0 comments on commit 31773c1

Please sign in to comment.