Skip to content
Browse files

Attempting one file for all

  • Loading branch information...
1 parent 8d6059d commit 6f4e57d8cc051a3b5fc37b24aaeca74204f5b0f3 @jakearchibald committed Sep 1, 2012
Showing with 22 additions and 10 deletions.
  1. +0 −9 osx.sh
  2. +15 −0 setup.sh
  3. +7 −1 terminal-prefs.sh
View
9 osx.sh
@@ -1,9 +0,0 @@
-# Download the other 3
-curl -#Lo ~/.git-completion.bash http://jakemac/git-tools/git-completion.bash
-curl -#Lo ~/.terminal-prefs.sh http://jakemac/git-tools/terminal-prefs.sh
-curl -#Lo ~/.git-shortcuts.sh http://jakemac/git-tools/git-shortcuts.sh
-
-# Echo the following to a given file
-echo "source ~/.git-completion.bash && source ~/.terminal-prefs.sh && source ~/.git-shortcuts.sh"
-# Run for current term
-source ~/.git-completion.bash && source ~/.terminal-prefs.sh && source ~/.git-shortcuts.sh
View
15 setup.sh
@@ -0,0 +1,15 @@
+# If no git, fail & exit
+# Add param that doesn't do the saving stuff
+
+# Decide on .bashrc or .bash_profile
+# Download the other 3
+
+# Only if git completion not already here...
+curl -#Lo ~/.git-completion.bash http://jakemac/git-tools/git-completion.bash
+# add source... to rc/profile
+# Run for the current session
+
+curl -#Lo ~/.terminal-prefs.sh http://jakemac/git-tools/terminal-prefs.sh
+curl -#Lo ~/.git-shortcuts.sh http://jakemac/git-tools/git-shortcuts.sh
+# add source... to rc/profile
+# Run for the current session
View
8 terminal-prefs.sh
@@ -77,8 +77,14 @@ bash_prompt() {
local BGC="\[\033[46m\]"
local BGW="\[\033[47m\]"
- PS1="$TITLEBAR\u@\h ${EMC}\${NEW_PWD}${EMY}\$(__git_ps1 '[%s]')${UC}\\$ ${NONE}"
+ if [[ $(git --version) == *msysgit* ]]; then
+ # The user & host stuff is lengthy and meaningless on Windows
+ PS1="${EMC}\${NEW_PWD}${EMY}\$(__git_ps1 '[%s]')${UC}\\$ ${NONE}"
+ else
+ PS1="$TITLEBAR\u@\h ${EMC}\${NEW_PWD}${EMY}\$(__git_ps1 '[%s]')${UC}\\$ ${NONE}"
+ fi
# extra backslash in front of \$ to make bash colorize the prompt
+
}
PROMPT_COMMAND=bash_prompt_command

0 comments on commit 6f4e57d

Please sign in to comment.
Something went wrong with that request. Please try again.