chisui / zsh-nix-shell

zsh plugin that lets you use zsh in nix-shell shells.
BSD 3-Clause "New" or "Revised" License
373 stars 19 forks source link

customize zsh when in nix-shell #12

Closed safareli closed 5 years ago

safareli commented 5 years ago

a bit off-topic question

Can you let's say change of zsh to something else only when it's running from nix-shell, so when you look at terminal you know if it's running in as part of nix-shell or not?

chisui commented 5 years ago

Since people use all kinds of themes and ways to construct their prompt this plugin can't change the prompt directly.

nix-shell itself sets IN_NIX_SHELL=1 in the environment. You can use that to set the prompt accordingly. This plugin also exposes what the shell actually contains as well. The readme hat a section on that with an example zsh theme that uses it.

safareli commented 5 years ago

thanks