Improve fish startup time

This commit is contained in:
ViViDboarder 2020-02-21 10:57:11 -08:00
parent 1370f6c960
commit a49c22116c
2 changed files with 8 additions and 3 deletions

View File

@ -2,5 +2,5 @@ set -gx fish_function_path "$fish_synced_dir/functions" $fish_function_path
set -gx fish_complete_path "$fish_synced_dir/completions" $fish_complete_path
source_synced 'init/alias'
source_synced 'init/env'
source_synced 'init/paths'
source_synced 'init/env'

View File

@ -31,9 +31,13 @@ end
# NPM paths
if type -q npm
set npm_path (npm bin -g 2> /dev/null)
set npm_path "$HOME/.npm/bin"
if [ ! -d "$npm_path" ]
# It's more robust to use the subshell, but far slower
set npm_path (npm bin -g 2> /dev/null)
end
if [ -d "$npm_path" ]
set -gx PATH $npm_path $PATH
set -gx PATH $PATH $npm_path
end
end
@ -66,6 +70,7 @@ end
if [ -d "$HOME/.local/bin" ]
set -gx PATH $HOME/.local/bin $PATH
end
if [ -d "$HOME/bin" ]
set -gx PATH $HOME/bin $PATH
end