Skip to content

Instantly share code, notes, and snippets.

@gianick
Forked from badrobit/blah.sh
Last active September 6, 2017 11:18
Show Gist options
  • Select an option

  • Save gianick/8eb5a586d1fbb9effaaad1c05b0ee8b9 to your computer and use it in GitHub Desktop.

Select an option

Save gianick/8eb5a586d1fbb9effaaad1c05b0ee8b9 to your computer and use it in GitHub Desktop.

Revisions

  1. gianick renamed this gist Sep 6, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. gianick revised this gist Dec 13, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions blah.sh
    Original file line number Diff line number Diff line change
    @@ -30,9 +30,9 @@ PathShort="\W"
    PathFull="\w"
    NewLine="\n"
    Jobs="\j"
    Login="${debian_chroot:+($debian_chroot)}$BBlue\u@\h$Color_Off:"
    Login="${debian_chroot:+($debian_chroot)}$Blue\u@\h$Color_Off:"

    export PS1=$Color_Off$Login$BYellow$PathFull$Color_Off'$(git branch &>/dev/null;\
    export PS1=$Color_Off$Login$Yellow$PathFull$Color_Off'$(git branch &>/dev/null;\
    if [ $? -eq 0 ]; then \
    echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
    if [ "$?" -eq "0" ]; then \
  3. gianick revised this gist Dec 13, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion blah.sh
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,7 @@ NewLine="\n"
    Jobs="\j"
    Login="${debian_chroot:+($debian_chroot)}$BBlue\u@\h$Color_Off:"

    export PS1=$Color_Off$Login$BPurple$PathFull$Color_Off'$(git branch &>/dev/null;\
    export PS1=$Color_Off$Login$BYellow$PathFull$Color_Off'$(git branch &>/dev/null;\
    if [ $? -eq 0 ]; then \
    echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
    if [ "$?" -eq "0" ]; then \
  4. gianick revised this gist Dec 13, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions blah.sh
    Original file line number Diff line number Diff line change
    @@ -32,15 +32,15 @@ NewLine="\n"
    Jobs="\j"
    Login="${debian_chroot:+($debian_chroot)}$BBlue\u@\h$Color_Off:"

    export PS1=$Color_Off$Login$BPurple$PathShort$Color_Off'$(git branch &>/dev/null;\
    export PS1=$Color_Off$Login$BPurple$PathFull$Color_Off'$(git branch &>/dev/null;\
    if [ $? -eq 0 ]; then \
    echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
    if [ "$?" -eq "0" ]; then \
    # @4 - Clean repository - nothing to commit
    echo "'$Green'"$(__git_ps1 " {%s}"); \
    echo "'$Green'"$(__git_ps1 " [ %s ]"); \
    else \
    # @5 - Changes to working tree
    echo "'$BRed'"$(__git_ps1 " {%s}"); \
    echo "'$BRed'"$(__git_ps1 " [ %s ]"); \
    fi) '$Color_Off'\$ "; \
    else \
    # @2 - Prompt when not in GIT repo
  5. Mat Roscoe revised this gist Sep 11, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions blah.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # Note: This should be placed in your .bashrc or .bash or .profile or whatever it is you use to control your
    # terminals appearance.

    # Reset
    Color_Off="\[\033[0m\]" # Text Reset

  6. Mat Roscoe revised this gist Sep 11, 2012. No changes.
  7. Mat Roscoe revised this gist Sep 11, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion blah.sh
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,7 @@ if [ $? -eq 0 ]; then \
    echo "'$Green'"$(__git_ps1 " {%s}"); \
    else \
    # @5 - Changes to working tree
    echo "'$IRed'"$(__git_ps1 " {%s}"); \
    echo "'$BRed'"$(__git_ps1 " {%s}"); \
    fi) '$Color_Off'\$ "; \
    else \
    # @2 - Prompt when not in GIT repo
  8. Mat Roscoe revised this gist Sep 11, 2012. No changes.
  9. Mat Roscoe created this gist Sep 11, 2012.
    45 changes: 45 additions & 0 deletions blah.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    # Reset
    Color_Off="\[\033[0m\]" # Text Reset

    # Regular Colors
    Black="\[\033[0;30m\]" # Black
    Red="\[\033[0;31m\]" # Red
    Green="\[\033[0;32m\]" # Green
    Yellow="\[\033[0;33m\]" # Yellow
    Blue="\[\033[0;34m\]" # Blue
    Purple="\[\033[0;35m\]" # Purple
    Cyan="\[\033[0;36m\]" # Cyan
    White="\[\033[0;37m\]" # White

    # Bold
    BBlack="\[\033[1;30m\]" # Black
    BRed="\[\033[1;31m\]" # Red
    BGreen="\[\033[1;32m\]" # Green
    BYellow="\[\033[1;33m\]" # Yellow
    BBlue="\[\033[1;34m\]" # Blue
    BPurple="\[\033[1;35m\]" # Purple
    BCyan="\[\033[1;36m\]" # Cyan
    BWhite="\[\033[1;37m\]" # White

    Time12h="\T"
    Time12a="\@"
    PathShort="\W"
    PathFull="\w"
    NewLine="\n"
    Jobs="\j"
    Login="${debian_chroot:+($debian_chroot)}$BBlue\u@\h$Color_Off:"

    export PS1=$Color_Off$Login$BPurple$PathShort$Color_Off'$(git branch &>/dev/null;\
    if [ $? -eq 0 ]; then \
    echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
    if [ "$?" -eq "0" ]; then \
    # @4 - Clean repository - nothing to commit
    echo "'$Green'"$(__git_ps1 " {%s}"); \
    else \
    # @5 - Changes to working tree
    echo "'$IRed'"$(__git_ps1 " {%s}"); \
    fi) '$Color_Off'\$ "; \
    else \
    # @2 - Prompt when not in GIT repo
    echo " '$Color_Off'\$ "; \
    fi)'