fish: conf/setup: Pass the shell syntax to use for fnm

From the twitter discussion with fnm author, shell inference seems to be
slow. Passing the shell to use manually seems to speed this up.

fnm env --log-level=quiet | source

Executed in  534.50 millis    fish           external
   usr time    0.62 millis  620.00 micros    0.00 millis
   sys time    4.76 millis    0.00 micros    4.76 millis

fnm env --shell=fish --log-level=quiet | source

Executed in    1.51 millis    fish           external
   usr time    1.06 millis    0.00 micros    1.06 millis
   sys time    0.58 millis  579.00 micros    0.00 millis

Also, see the github issue
https://github.com/Schniz/fnm/issues/621
This commit is contained in:
Sanchayan Maity 2022-01-03 12:12:53 +05:30
parent 4c091da20d
commit 95a247891e

View file

@ -39,7 +39,7 @@ function __fish_setup_on_tty_login --description "Set up environment on tty logi
end
if type -qf fnm
fnm env | source
fnm env --shell=fish --log-level=quiet | source
end
set -gx CLICOLOR 1