Totally new to Nix.
I’ve installed Nix on tumblweed and I’m currently exploring nix-env.
All nix-env commands currently pipe their output to vim rather than cat.
Where can I change this behaviour?
As an example running “nix-env -q” will launch vim with the output of the command that I then have to quit out of rather than piping it to cat which I believe is what it should be doing and what various videos I’ve seen show it doing.
Did you set
$VISUAL to vim? I didn’t know
nix-env used that.
No I haven’t set any settings, it’s a fresh install of Tumbleweed and Nix on top of that.
I simply installed Nix as fresh and it’s defaulting to vim out of the box.
I’ve just checked $VISUAL isn’t set to anything on my system. I just exported VISUAL to cat:
But this had no effect on the nix-env commands, it still pipes to Vim.
I can pipe it to cat manually and it then has the desired behaviour:
$ nix-env -q | /usr/bin/cat
Would really be great to make this the default.
Yeah, that’s really odd. The nix manual doesn’t suggest any such feature, and I’ve never seen it before. Nix normally just outputs to stdout, which should just print to your terminal if you don’t pipe it anywhere else.
I suspect it’s your shell doing something, though I wouldn’t know what. I’ve never used tumbleweed, so I wouldn’t know what their shell configuration does. I know you can configure some shells to display things that exceed the terminal size in
$VISUAL, which is often vim or less, and may have defaults depending on the configuration.