Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reserve exclamation for foreign machines

  • Loading branch information...
commit 7d34c7b33301a584f88bd51908323ebd0b104296 1 parent be3f4a2
@xtfxme authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 .../self/data/profile/etc/bash/interactive
View
9 .../self/data/profile/etc/bash/interactive
@@ -157,22 +157,21 @@ _ps1 () { (
alias f='c=setaf _esc'
alias b='c=setab _esc'
+ local c=$((${EUID}==0&&(c=1)||(c=7),c))
declare w="$(x;e bold;f 0)"
declare d="${w}"
- declare u="$(x;f 7)\u${d}$(x;f 3)\h"
+ declare u="$(x;f ${c})\u${d}$(x;f 3)\h"
declare h="$(f 7)# "
declare q='2>/dev/null'
declare s=( )
[[ ${HOSTNAME} =~ xtfx\.net$ ]] &&
- s+=("$(f 2)")
+ s+=("$(f 2)") ||
+ s+=("$(f 1)")
[[ ${SSH_CONNECTION} =~ [0-9.]+ ]] &&
s+=("$(f 4)")
- [[ ${EUID} == 0 ]] &&
- s+=("$(f 1)")
-
((${#s})) &&
s=" $(e bold)${s[*]} "
Please sign in to comment.
Something went wrong with that request. Please try again.