summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-07-22 02:30:30 +0000
committerAron Griffis <agriffis@gentoo.org>2004-07-22 02:30:30 +0000
commite62a941a2ca5c47b3d3710aa31449c90d3b2f5c2 (patch)
treef581634d6dde1bab37a9b46537b6a5d69273e7df /app-shells/bash/files/bashrc
parentstable on ppc64, bug #57585 (Manifest recommit) (diff)
downloadgentoo-2-e62a941a2ca5c47b3d3710aa31449c90d3b2f5c2.tar.gz
gentoo-2-e62a941a2ca5c47b3d3710aa31449c90d3b2f5c2.tar.bz2
gentoo-2-e62a941a2ca5c47b3d3710aa31449c90d3b2f5c2.zip
Install and use /etc/bash/bashrc; half of fix for bug 26952. Thanks to Toby Dickenson for the dircolors tip
Diffstat (limited to 'app-shells/bash/files/bashrc')
-rw-r--r--app-shells/bash/files/bashrc23
1 files changed, 23 insertions, 0 deletions
diff --git a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc
new file mode 100644
index 000000000000..bb72d3503306
--- /dev/null
+++ b/app-shells/bash/files/bashrc
@@ -0,0 +1,23 @@
+# /etc/bash.bashrc:
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/files/bashrc,v 1.1 2004/07/22 02:30:30 agriffis Exp $
+#
+# This file is sourced by all *interactive* bash shells on startup,
+# including some apparently interactive shells such as scp and rcp
+# that can't tolerate any output.
+
+
+# Test for an interactive shell. There is no need to set anything
+# past this point for scp and rcp, and it's important to refrain from
+# outputting anything in those cases.
+if [[ $- != *i* ]]; then
+ # Shell is non-interactive. Be done now
+ return
+fi
+
+# Set colorful PS1 only on colorful terminals
+if dircolors --print-database | grep -Fqx "TERM $TERM"; then
+ PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]'
+else
+ PS1='\u@\h \w \$ '
+fi
+export PS1