]> git.zndr.dk Git - dotfiles.git/commitdiff
Msys \n prompt problem fix
authorJannik ZANDER <jzander@grundfos.com>
Mon, 23 May 2016 19:27:42 +0000 (21:27 +0200)
committerJannik ZANDER <jzander@grundfos.com>
Mon, 23 May 2016 19:27:42 +0000 (21:27 +0200)
.config/profile/rc/prompt.sh

index e8a0a6bfa2f18a4ee27cc84866a13b8ee365f1db..d3ba0989ee896053845cc095d4a47f787cc3e7bf 100644 (file)
@@ -12,7 +12,7 @@ elif infocmp xterm-256color >/dev/null 2>&1; then
   export TERM='xterm-256color';
 fi;
 
-if [ -f "${HOME}/.config/profile/rc/git-prompt.sh" ]; then
+if [ -f "${HOME}/.config/profile/rc/git-prompt.sh" ]; then
   URL="https://raw.githubusercontent.com/git/git/master/contrib/completion"
   curl "${URL}/git-prompt.sh" -L -s -o "${HOME}/.config/profile/rc/git-prompt.sh"
 fi
@@ -150,7 +150,7 @@ set_prompts()
     # Set the terminal title to the current working directory.
     PS1="\[\033]0;\w\007\]"
 
-    PS1+="\n" # newline
+    PS1+=$'\n' # newline
     PS1+="\[$userStyle\]\u" # username
     PS1+="\[$reset$white\] at "
     PS1+="\[$hostStyle\]\h" # host
@@ -158,14 +158,14 @@ set_prompts()
     PS1+="\[$green\]\w" # working directory
   #  PS1+="\$(prompt_git \"$white on $cyan\")" # git repository details
     PS1+="\$(__git_ps1 ' \[${white}\]on \[${cyan}\]%s]')";  # on branch
-    PS1+="\n"
+    PS1+=$'\n'
     PS1+="\[$reset$white\]\$ \[$reset\]" # $ (and reset color)
 
     PS2="\[${yellow}\]→ " # `→`
     PS2+="\[${reset}\]" # reset color
   else
-    PS1="\u at \h in \w on \$(__git_ps1 %s])\n\$ "
-
+    PS1="\u at \h in \w on \$(__git_ps1 %s])"
+    PS1+=$'\n''\$ '
     PS2="→ "
   fi