]> arthur.barton.de Git - ax-zsh.git/blobdiff - ax.zsh
browser_select: Do not use open(1) on Linux to prevent endless recursion
[ax-zsh.git] / ax.zsh
diff --git a/ax.zsh b/ax.zsh
index 3d693da9725fbf4cde83fec09e555017d69a6c6f..e21b24657409a85f3d20b5f73a3329a7036a3ffa 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -1,5 +1,5 @@
 # AX-ZSH: Alex' Modular ZSH Configuration
-# Copyright (c) 2015-2020 Alexander Barton <alex@barton.de>
+# Copyright (c) 2015-2022 Alexander Barton <alex@barton.de>
 
 script_name="${${(%):-%N}:t}"
 script_type="$script_name[2,-1]"
@@ -65,6 +65,17 @@ function axzsh_handle_stage {
                        && echo "   (Writing new cache file to \"$new_cache_file\" ...)"
                if ! printf "# %s\n\n" "$(LC_ALL=C date)" >"$new_cache_file"; then
                        unset new_cache_file
+               else
+                       # New cache file successfully created ...
+                       if [[ "$type" = "ax-io" ]]; then
+                               # AX-IO Stage:
+                               # Write an initial PATH variable to the cache
+                               # file, which becomes overwritten by the path
+                               # plugin at the "zprofile" stage later on, but
+                               # this way "ax-io" stage plugins have a somewhat
+                               # saner PATH to begin with ...
+                               printf 'export PATH="%s"\n\n' "$PATH" >>"$new_cache_file"
+                       fi
                fi
 
                # Read in all the plugins for the current "type":