summaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2022-05-05 14:26:43 -0500
committerMitsuo Tokumori <[email protected]>2022-05-05 14:26:43 -0500
commit90f39c31e9f19bf51f0ceb9e21373dede01a4581 (patch)
tree767e3f88ba94e26db05685bab636b6aabd6a61cf /bashrc
parent57e7ad1f6d8fa823155ca414bba82ca2d497504f (diff)
parentaf0561f1d902d0fb84412ca6c301152ec44407c1 (diff)
downloaddotfiles-90f39c31e9f19bf51f0ceb9e21373dede01a4581.tar.gz
dotfiles-90f39c31e9f19bf51f0ceb9e21373dede01a4581.tar.bz2
dotfiles-90f39c31e9f19bf51f0ceb9e21373dede01a4581.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc15
1 files changed, 9 insertions, 6 deletions
diff --git a/bashrc b/bashrc
index 2d1fe86..bb389e0 100644
--- a/bashrc
+++ b/bashrc
@@ -56,15 +56,18 @@ if [ -n "$force_color_prompt" ]; then
fi
fi
-if [ "$color_prompt" = yes ]; then
+# Keep the git-bash prompt if available (check if $TITLEPREFIX is set)
+# git-bash promp is helpful when browsing a git-repository
+#PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$'
+if [[ "$color_prompt" = yes && ! -v $TITLEPREFIX ]]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\hh\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# Blue timestamp and italic green pwd
PS1='\[\033[34m\]|\D{%H:%M:%S}| \[\033[3;32m\][\w]\[\033[00m\]\n\$ '
-else
- # plain and simple
- PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+#else
+# # plain and simple
+# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
-unset color_prompt force_color_prompt
+#unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
@@ -118,7 +121,7 @@ fi
# Custom prompt:
# Blue timestamp and italic green pwd
-PS1='\[\033[34m\]|\D{%H:%M:%S}| \[\033[3;32m\][\w]\[\033[00m\]\n\$ '
+#PS1='\[\033[34m\]|\D{%H:%M:%S}| \[\033[3;32m\][\w]\[\033[00m\]\n\$ '
# Environmental variables:
# less(1) config (ignore case in searchs and display raw control characters)