]> git.sev.monster Git - dotfiles.git/commitdiff
zshenv: path performance micro optimization
authorsev <git@sev.monster>
Mon, 14 Oct 2024 23:34:18 +0000 (18:34 -0500)
committersev <git@sev.monster>
Mon, 14 Oct 2024 23:34:18 +0000 (18:34 -0500)
etc/zsh/.zshenv

index 922314ff2ae78dd12b54329104124fc81bf2d53c..b1ae0fdbddcdaaf533e6d4fd9394ecf2ec1c94f7 100644 (file)
@@ -80,8 +80,8 @@ function _sev_setpath {
           # emulate Arch Linux flatpak-bindir.sh for use on other systems
           {${XDG_DATA_HOME:-~/.local/share},{$PREFIX,}/var/lib}/flatpak/exports/bin)
     local -i i len=$#path
-    path=("$path[@]" "$syspath[@]")
-    # remove bad paths
+    path+=("$syspath[@]")
+    # remove bad paths... after having combined the arrays to remove duplicates
     for (( i = 1; i <= $#path; i++ )) {
         if [[ ! -d $path[$i] ]] {
             path[$i]=()
This page took 0.03619 seconds and 4 git commands to generate.