From 55fe20a5ef1315bbe175330b8e4633e855393d14 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 26 Mar 2022 15:50:33 +1300 Subject: Include prompt prefix when using Torsocks --- bash/bashrc.d/prompt.bash | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bash') 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}' -- cgit v1.2.3