annotate .shell.d/99.prompt.bash @ 351:bef29d49d19f

safe-paste: adds support for bracketed paste mode to zsh Since I don't use oh-my-zsh, just import their code directly with a reference. Based on the site where I learned about this [0], it's originally from [1], and I downloaded it from [2]. 0: https://cirw.in/blog/bracketed-paste 1: http://www.zsh.org/mla/users/2011/msg00367.html 2: https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/plugins/safe-paste/safe-paste.plugin.zsh
author Augie Fackler <raf@durin42.com>
date Mon, 10 Nov 2014 09:26:04 -0500
parents cb6704a7cef2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 if [ "x`whoami`" = "xroot" ] ; then
50
cb6704a7cef2 Fix root version of the bash prompt to not hork command line wrapping.
Augie Fackler <durin42@gmail.com>
parents: 39
diff changeset
2 PS1='\[\e];\u@\h: \w [bash]\]\a[\h:\w] \[\e[31m\]\u\[\e[0m\]# '
39
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3 else
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
4 PS1='\[\e];\u@\h: \w [bash]\a\][\h:\w] \[\e[34m\]\u\[\e[0m\]$ '
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
5 fi
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
6
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
7 if [ "$TERM" = "rxvt" ] || [ "$TERM" = "xterm" ] \
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
8 || [ "$TERM" = "xterm-color" ] || [ "$TERM" = "screen" ]; then
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
9 export FANCYTYPE="YES"
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
10 else
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
11 export FANCYTYPE="NO"
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
12 PS1='[\h:\w] \u$ '
62bfb554ab85 Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
13 fi