aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/prompt.bash7
-rw-r--r--ksh/kshrc.d/prompt.ksh7
-rw-r--r--zsh/zshrc.d/prompt.zsh7
3 files changed, 21 insertions, 0 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index f9678f20..a2066386 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -30,6 +30,13 @@ prompt() {
(*) PS1=bash:$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}'
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}'
diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh
index 980d8669..8fe9ffc7 100644
--- a/zsh/zshrc.d/prompt.zsh
+++ b/zsh/zshrc.d/prompt.zsh
@@ -24,6 +24,13 @@ prompt() {
(*) PS1=zsh:$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}'