summaryrefslogtreecommitdiff
path: root/usr/src/cmd/nsadmin/bashrc.sh
blob: 128f6b79d7c1116cf2a2ab3e1e1395ac7bf5a29e (plain)
1
2
3
4
5
6
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}/~}\$ ")'