[Nix-dev] weird garbage output inside nix-shell

Roni Choudhury aichoudh at gmail.com
Wed Jun 7 15:24:50 CEST 2017


On Wed, Jun 7, 2017 at 12:14 AM Samuel Leathers <disasm at 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?

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.

Thanks!

roni

> On Tue, Jun 6, 2017, 08:07 Roni Choudhury <aichoudh at gmail.com> wrote:
>
>> Hi all!
>>
>> I’m using nix-shell to do some development. I have the environment set
>> up so I can build my code, but I had a question about invoking packages not
>> in the shell’s environment. For instance, in that shell, when I run vim,
>> I get output like this:
>>
>> vim: àΠbü : x    #í : Error 224711464
>> vim:  }ÿ : xépOö : Error 1320334120
>>
>> These two lines came from two different invocations - note how the output
>> seems to be random.
>>
>> If I include vim in shell.nix, then I don’t see this problem. (I don’t
>> want to include vim in shell.nix in this case, because I don’t think the
>> choice of editor is critical to the build environment, etc.)
>>
>> My main question is: *what is causing this strange output?*
>>
>> My secondary question: *how do I invoke nix-shell in such a way as to
>> instantiate the environment specified in shell.nix, plus a few “custom”
>> packages (such as vim)?*
>>
>> I guess I should mention that my shell of choice is zsh. When I run
>> nix-shell I get dropped into a bash shell. From there, if I invoke zsh
>> I’m back where I want to be. Could that quirk have something to do with
>> this?
>>
>> Thanks in advance!
>>
>> roni
>>>>
> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> https://mailman.science.uu.nl/mailman/listinfo/nix-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170607/3ca6c75b/attachment.html>


More information about the nix-dev mailing list