diff options
author | Karel Kočí <cynerd@email.cz> | 2022-06-20 12:04:39 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-06-20 12:04:39 +0200 |
commit | f64e98b37125580992812c0dc1e96e6560792035 (patch) | |
tree | 075452716316646e78a12a2c5dc5e8e59524e200 /bashrc.d/prompt | |
parent | f6b661ebf0cbd9ecae64eb1f757dc1b4073b1d73 (diff) | |
download | shellrc-f64e98b37125580992812c0dc1e96e6560792035.tar.gz shellrc-f64e98b37125580992812c0dc1e96e6560792035.tar.bz2 shellrc-f64e98b37125580992812c0dc1e96e6560792035.zip |
bashrc: detect nix shell
Diffstat (limited to 'bashrc.d/prompt')
-rw-r--r-- | bashrc.d/prompt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bashrc.d/prompt b/bashrc.d/prompt index 6632037..39ea1f4 100644 --- a/bashrc.d/prompt +++ b/bashrc.d/prompt @@ -3,7 +3,7 @@ PS1='$( if [ "$(id -u)" -eq "0" ]; then echo -n "\[\e[1;31m\]\u@\h:\[\e[1;34m\]\W\[\e[1;31m\]\$\[\e[0m\] " -elif [ "${_SHELLRC:-}" = "develop" ]; then +elif [ "${_SHELLRC:-}" = "develop" ] || [ -n "${IN_NIX_SHELL}" ]; then echo -n "\[\e[1;33m\]\u@\h:\[\e[1;34m\]\W\[\e[1;33m\]\$\[\e[0m\] " else echo -n "\[\e[1;32m\]\u@\h:\[\e[1;34m\]\W\[\e[1;32m\]\$\[\e[0m\] " |