Skip to content

Instantly share code, notes, and snippets.

@ales-vilchytski
Last active April 25, 2016 08:54
Show Gist options
  • Save ales-vilchytski/79c97bcca128f6e5e9294d1f83e83a36 to your computer and use it in GitHub Desktop.
Save ales-vilchytski/79c97bcca128f6e5e9294d1f83e83a36 to your computer and use it in GitHub Desktop.

Revisions

  1. ales-vilchytski revised this gist Apr 25, 2016. 1 changed file with 0 additions and 6 deletions.
    6 changes: 0 additions & 6 deletions bashrc_misc.md
    Original file line number Diff line number Diff line change
    @@ -20,9 +20,3 @@ function set-title() {
    echo -ne "\033]0;${1}\007"
    }
    ```

    # Bash prompt for mingw64 (msys-git)

    ```
    export PS1="\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]\[\033[33m\]\w\[\033[33m\]`__git_ps1`\[\033[0m\]\n$"
    ```
  2. ales-vilchytski revised this gist Apr 25, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bashrc_misc.md
    Original file line number Diff line number Diff line change
    @@ -24,5 +24,5 @@ function set-title() {
    # Bash prompt for mingw64 (msys-git)

    ```
    export PS1=\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]\[\033[33m\]\w\[\033[33m\]`__git_ps1`\[\033[0m\]\n$
    export PS1="\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]\[\033[33m\]\w\[\033[33m\]`__git_ps1`\[\033[0m\]\n$"
    ```
  3. ales-vilchytski revised this gist Apr 25, 2016. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions bashrc_misc.md
    Original file line number Diff line number Diff line change
    @@ -20,3 +20,9 @@ function set-title() {
    echo -ne "\033]0;${1}\007"
    }
    ```

    # Bash prompt for mingw64 (msys-git)

    ```
    export PS1=\[\033]0;$TITLEPREFIX:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]\[\033[33m\]\w\[\033[33m\]`__git_ps1`\[\033[0m\]\n$
    ```
  4. ales-vilchytski created this gist Apr 8, 2016.
    22 changes: 22 additions & 0 deletions bashrc_misc.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # Bash prompt like in msysgit:

    ```
    function parse_git_branch () {
    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
    }
    RED="\[\033[0;31m\]"
    YELLOW="\[\033[0;33m\]"
    GREEN="\[\033[0;32m\]"
    NO_COLOR="\[\033[0m\]"
    PS1="\n$GREEN\u@\h$YELLOW \w\$(parse_git_branch)$NO_COLOR\n\$ "
    ```

    # Set gnome-terminal title

    ```
    function set-title() {
    echo -ne "\033]0;${1}\007"
    }
    ```