root/admin prompt is red now
I really miss bash's visual way of signalising root, i.e. blue: user, red: root
So I brought it to nushell (since you've added `is-admin` the code is fully portable and easily-readable) and hope you'll like it
# Nushell Environment Config File
def create_left_prompt [] {
- let path_segment = ($env.PWD)
+ let path_segment = if (is-admin) {
+ $"(ansi red_bold)($env.PWD)"
+ } else {
+ $"(ansi green_bold)($env.PWD)"
+ }
$path_segment
}
