aboutsummaryrefslogtreecommitdiff
path: root/ksh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-03-26 15:50:33 +1300
committerTom Ryder <tom@sanctum.geek.nz>2022-03-26 17:14:47 +1300
commit55fe20a5ef1315bbe175330b8e4633e855393d14 (patch)
treef78966e5be4a0b767a9372605c535d4efdf90764 /ksh
parentCorrect capitalisation for LibreWolf (diff)
downloaddotfiles-55fe20a5ef1315bbe175330b8e4633e855393d14.tar.gz
dotfiles-55fe20a5ef1315bbe175330b8e4633e855393d14.zip
Include prompt prefix when using Torsocks
Diffstat (limited to 'ksh')
-rw-r--r--ksh/kshrc.d/prompt.ksh7
1 files changed, 7 insertions, 0 deletions
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh
index 64e22e8e..f319fdd8 100644
--- a/ksh/kshrc.d/prompt.ksh
+++ b/ksh/kshrc.d/prompt.ksh
@@ -34,6 +34,13 @@ function prompt {
(*) PS1=$ksh:$PS1 ;;
esac
+ # If torsocks is on, report that
+ case $LD_PRELOAD in
+ (*/libtorsocks.so:|*/libtorsocks.so)
+ PS1='[Tor]'$PS1
+ ;;
+ esac
+
# Add prefix and suffix
PS1='${PROMPT_PREFIX}'$PS1'${PROMPT_SUFFIX}'