zsh: Remove path deduplication
Aside from some more needed things, the path deduplication function is the most time-consuming invocation on zsh startup, taking almost 100ms on my system. Perhaps it would be reasonable to re-introduce when the first invocation from path is occurring but it is simply too much time taken for each time I start a new shell instance for now.
This commit is contained in:
parent
3bd67eab3d
commit
eeca1f3817
1 changed files with 0 additions and 8 deletions
|
@ -192,14 +192,6 @@ get_var() {
|
|||
set_var() {
|
||||
eval "$1=\"\$2\""
|
||||
}
|
||||
dedup_pathvar() {
|
||||
pathvar_name="$1"
|
||||
pathvar_value="$(get_var "$pathvar_name")"
|
||||
deduped_path="$(perl -e 'print join(":",grep { not $seen{$_}++ } split(/:/, $ARGV[0]))' "$pathvar_value")"
|
||||
set_var "$pathvar_name" "$deduped_path"
|
||||
}
|
||||
dedup_pathvar PATH
|
||||
dedup_pathvar MANPATH
|
||||
|
||||
unset CONFDIR
|
||||
unset ZSHCONFDIR
|
||||
|
|
Loading…
Reference in a new issue