$fish_user_pathsより$PATHを優先させる
brewで入れたコマンドよりaptで入れたコマンドを優先させたいときがある
(brewのcurlだと証明書周りが上手くいかなくてaptのcurl使ったらうまくいった)
config.fishに
code:config.fish
fish_add_paths $PATH
でできる
code:sh
$ printf "%s\n" $PATH
/home/ras/.asdf/shims # ここからasdf
/home/linuxbrew/.linuxbrew/opt/asdf/libexec/bin
/home/linuxbrew/.linuxbrew/bin # ここから元のfish_user_paths
/home/linuxbrew/.linuxbrew/sbin
/home/ras/go/bin
/usr/local/sbin # ここからPATH
/usr/local/bin
...
$ fish_add_path $PATH
$ printf "%s\n" $PATH
/home/linuxbrew/.linuxbrew/opt/asdf/libexec/bin
/usr/local/sbin # ここからPATH
/usr/local/bin
...
/home/linuxbrew/.linuxbrew/bin # ここから元のfish_user_paths
/home/linuxbrew/.linuxbrew/sbin
/home/ras/go/bin
fish_variablesファイルに追加されるのでやや微妙
code:diff
-SETUVAR fish_user_paths:/home/linuxbrew/\x2elinuxbrew/bin\x1e/home/linuxbrew/\x2elinuxbrew/sbin\x1e/home/ras/go/bin
+SETUVAR fish_user_paths:/home/ras/\x2easdf/shims\x1e/home/linuxbrew/\x2elinuxbrew/opt/asdf/libexec/bin\x1e/usr/local/sbin\x1e/usr/local/bin\x1e/usr/sbin\x1e/usr/bin\x1e/sbin\x1e/bin\x1e/usr/games\x1e/usr/local/games\x1e/usr/lib/wsl/lib\x1e/home/linuxbrew/\x2elinuxbrew/bin\x1e/home/linuxbrew/\x2elinuxbrew/sbin\x1e/home/ras/go/bin
SETUVAR theme_color_scheme:base16\x2dlight