From 9e57d05af82e172567e5092041803b4c8b038f55 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Sun, 23 Mar 2025 17:06:23 -0400 Subject: [PATCH] Make `doas` friendly --- my_home/.kshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/my_home/.kshrc b/my_home/.kshrc index ee796fa..e8312f2 100644 --- a/my_home/.kshrc +++ b/my_home/.kshrc @@ -20,10 +20,15 @@ alias p='cat' alias n='cat -n' # exports -export PS1='$USER:/${PWD#/}:!$ ' export HISTFILE="$HOME/.sh_history" export PKG_PATH="http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.1/All/" +if [ $USER = 'root' ]; then + export PS1='$USER:/${PWD#/}:!# ' +else + export PS1='$USER:/${PWD#/}:!$ ' +fi + if command -v emacs > /dev/null 2>&1; then export EDITOR='emacs -nw' elif command -v mg > /dev/null 2>&1; then