diff options
Diffstat (limited to 'etc/sh/rc')
-rw-r--r-- | etc/sh/rc | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -297,6 +297,20 @@ guix_env() { printf ')' } +in_nix_shell() { + if [ -z "${IN_NIX_SHELL:-}" ]; then + return + fi + + printf '\n' + color -c blacki '~> ' + color -c purpleb "$IN_NIX_SHELL " + color -c purple 'nix-shell ' + printf '(' + color -c blueb "${name:-}" + printf ')' +} + in_ssh_session() { if [ -n "${SSH_CLIENT:-}" ]; then color -c blackb '\\u' @@ -323,7 +337,7 @@ vcs_status() { fi } -PS1='`error_marker`'$(timestamp)' '$(path)'`direnv_status``makeflags_status` `shell_status``vcs_status``guix_env` +PS1='`error_marker`'$(timestamp)' '$(path)'`direnv_status``makeflags_status` `shell_status``vcs_status``guix_env``in_nix_shell` '$(in_ssh_session)'$ ' export PS1 |