diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-01-17 01:54:02 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-01-17 01:54:02 +0100 |
| commit | 4d4acf65509319d56ca6f3ee2970d77b3f82b73f (patch) | |
| tree | bc7ef8a45bf721b53b81a189bd60a30c1774da13 /modules/examples | |
| parent | 2aeaa86bc770fdf8fae94e456ffe797640583984 (diff) | |
zsh: don't clobber promptInit in a nix-shell
Configure this yourself if you want a different prompt
when a nix-shell is active.
Diffstat (limited to 'modules/examples')
| -rw-r--r-- | modules/examples/lnl.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index 0173e82..e21c2ad 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -203,8 +203,12 @@ programs.zsh.promptInit = '' autoload -U promptinit && promptinit - PROMPT='%B%(?..%? )%b⇒ ' - RPROMPT='%F{green}%~%f' + if [ -n "$IN_NIX_SHELL" ]; then + PS1='%F{green}%B[nix-shell]%#%b%f ' + else + PS1='%B%(?..%? )%b⇒ ' + fi + RPS1='%F{green}%~%f' ''; programs.zsh.loginShellInit = '' |
