From caa1dd461e93ae16604d5b5bc7fd06af7d9a81d4 Mon Sep 17 00:00:00 2001 From: sev Date: Mon, 14 Oct 2024 18:33:49 -0500 Subject: [PATCH] zshenv: fix comments --- etc/zsh/.zshenv | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/etc/zsh/.zshenv b/etc/zsh/.zshenv index 8bf4cbe..922314f 100644 --- a/etc/zsh/.zshenv +++ b/etc/zsh/.zshenv @@ -54,7 +54,7 @@ function _sev_setpath { # add as many generic paths as possible to keep the order we want # NOTE: tied arrays path and fpath already exist, but are not unique (-U); # we utilize the fact that unique arrays keep the first occurrence - # and remove any further occurences to check for elements from the + # and remove any further occurrences to check for elements from the # old PATH that we did not anticipate and shift them to the front, # since they are probably important to the system typeset -gU path fpath @@ -65,6 +65,13 @@ function _sev_setpath { # with something like Environment Modules. this code does not account # for this type of usage and will add all valid paths. any undesired # paths can be removed using .zshenv.local. + # NOTE: fun non-conformant systems like Android may have fun dirs that + # contain binaries intended solely for the base system, and their use + # by other users/subsystems may cause problems. for example, + # /system/bin/bc on Android may be a different version of or + # completely different codebase compared to the Termux-installed bc. + # modern Termux does not add these such systems to PATH by default, + # but older versions/configurations might. # XXX: PREFIX not validated, non-POSIX but Termux uses it, maybe others # XXX: XDG specifies ~/.local/bin as the only user-writable dir for # executables, but we specify more; technically this is against spec @@ -305,9 +312,9 @@ load-site-dotfile zshenv ### source .zprofile early for non-login shells that should be if [[ ! -v _sev_first_display && ( -v DISPLAY || -v WAYLAND_DISPLAY ) ]] { # most graphical login/session managers will spawn the user's shell as a - # parent of all child processes for that session. however, if the parent shell - # isn't a login shell for some reason, our .zprofile won't be run, and the - # environment won't be configured for child processes. + # parent of all child processes for that session. however, if the parent + # shell isn't a login shell for some reason, our .zprofile won't be run, + # and the environment won't be configured for child processes. # # XXX: .zprofile will be sourced by every new child shell if zsh is not # used to start the graphical session and the _sev_first_display var -- 2.48.1