summaryrefslogtreecommitdiff
path: root/usr/src/cmd/nsadmin/etc-skel-bashrc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/nsadmin/etc-skel-bashrc.sh')
-rw-r--r--usr/src/cmd/nsadmin/etc-skel-bashrc.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/src/cmd/nsadmin/etc-skel-bashrc.sh b/usr/src/cmd/nsadmin/etc-skel-bashrc.sh
new file mode 100644
index 0000000000..128f6b79d7
--- /dev/null
+++ b/usr/src/cmd/nsadmin/etc-skel-bashrc.sh
@@ -0,0 +1,7 @@
+#
+# Define default prompt to <username>@<hostname>:<path><"($|#) ">
+# and print '#' for user "root" and '$' for normal users.
+#
+PS1='${LOGNAME}@$(/usr/bin/hostname):$(
+ [[ "${LOGNAME}" == "root" ]] && printf "%s" "${PWD/${HOME}/~}# " ||
+ printf "%s" "${PWD/${HOME}/~}\$ ")'