# 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
# 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
### 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