Fix regression introduced in #11550. If an existing alias was present in
the moment of sourcing, and oh-my-zsh aliases were disabled for that
file, it'd be overwritten aswell. See #11658.
BREAKING CHANGE: the previous zstyle setting to disable `lib/directories.zsh` aliases has
been changed to the new syntax: `zstyle ':omz:lib:directories' aliases no`. See
https://github.com/ohmyzsh/ohmyzsh#skip-aliases to see other ways you can use this setting.
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This fixes an edge case where the user actually sets
zstyle ':completion:*' list-colors
in their zshrc, but the previous code used a precmd hook, which would
override the user changes. With this change our modifications will be
set in the init script, after the theme loads, so that later changes
can affect our defaults.
Note that this will not be run for users on plugin managers, as these
don't generally run our init script.
If `$SHORT_HOST` contains invalid filename characters, the compinit call doesn't
error, but the zcompdump metadata write does. Use `tee` instead so we can silence
the error.
See dd1a72696f (commitcomment-38984764)
The statements for selecting a random theme in oh-my-zsh.sh and the themes
plugin are duplicate. Most people eventually settle on a theme, making those
lines in oh-my-zsh.sh superfluous. To address those, it may makes sense to put
the random theme functionality into a theme of its own (since themes are just
zsh scripts.
We have to assume that if people disabled the compfix system they really want
their completion to work, ignoring any permission issues.
Fixes#5651Fixes#5957Fixes#6461
Completion-dependent directories with insecure permissions or ownership (e.g.,
group or other writability) are now detected, reported, and sanitized on OMZ
startup rather than unsafely ignored -- which resulted in effectively empty
completion caches and obscure compdef() errors resembling
"compdef: unknown command or service: git".
This fixes long-standing issues #630, #3356, and #3455 and related Babun issues
159, 281, and 322 -- and probably numerous other duplicates.