jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.13k stars 71 forks source link

`nvm use` in config.fish interrupts SCP transfer #165

Closed nc7s closed 3 years ago

nc7s commented 3 years ago

Hi,

It's a little annoying that when I have nvm use in my config.fish and scp from somewhere else, nvm use would say "Now using Node vx.y.z" then scp just exits, no transfer happens. Back to normal when nvm use is removed. But I want to have Node ready on remote sessions.

jorgebucaran commented 3 years ago

Do it only if interactive:

if status is-interactive
    nvm use x.z.y
end

If that doesn't help, instead of using nvm use in your config.fish, try setting nvm_default_version (once) in the CLI.

set --universal nvm_default_version x.y.z
nc7s commented 3 years ago

set -xU nvm_default_version x.y.z solved it, and wouldn't say "Now using" on every new session startup. Thank you 😄