Hi all- Linus, Sam, and Sergiu - thank you for the suggestions. I did poke around in the output from `env` and discovered IN_NIX_SHELL, and arranged my .zshrc to show `${name}` when `$IN_NIX_SHELL` is true. Fantastic!
I'm not sure the other problem has to do with character encodings (though I don't know too much about how that works). I did notice that `ldd $(which vim)` shows me different results when I am inside my nix-shell vs. when I'm not. I kind of thought I shouldn't even be able to launch vim from inside my shell if it's not listed as a buildDep. If I send my shell.nix, would someone else mind trying to use it to see if you can reproduce my strange results? Thanks! roni On Fri, Jun 9, 2017 at 9:40 AM Sergiu Ivanov <siva...@colimite.fr> wrote: > Hello Roni, > > Thus quoth Roni Choudhury at 13:24 on Wed, Jun 07 2017: > > On Wed, Jun 7, 2017 at 12:14 AM Samuel Leathers <dis...@gmail.com> > wrote: > > > >> I use nix-shell --run zsh. I alias that to nshell. > >> > > Thanks, Sam, this is a great idea! On this note, do you know of a good > way > > to update the prompt to reflect the nix-shell environment I'm in? i.e., > is > > there a way to *name* the nix-shell env, and get access to that name > > through an environment variable? > > nix-shell --run 'MY_SHELL_NAME=foo zsh' > > will allow you to tag the shell with a custom environment variable. > > If you want to update the prompt, you should probably play around with > shell prompt variables (like PS1 in bash): > > > http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Prompt-Expansion > > > > I wanted to add that even if I don't drop into zsh as my first act in the > > nix-shell, I still get that weird output from executables not in the > > environment (such as `zsh` and `git`). If anyone has any insight or can > > answer my other question, that would be great. > > My first reaction on seeing your very first mail was that you were > probably having issues with processing of ASCII terminal codes. > Unfortunately, I don't have any clear suggestions. > > Have you tried running the commands in different terminal emulators? > > -- > Sergiu >
_______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev