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.
We are running oh-my-zsh on a shared install and the only issue is each
user having a custom cache dir. This will allow us to set the cache dir
to ZSH_CACHE_DIR=~/oh-my-zsh/cache/ .
Apparently, it is possible to set up a Mac such that
`scutil --get ComputerName` hasn't been set.
This change checks if that fails and falls back to the original
mechanism.
Closes#2155Closes#2183
This will prevent lots of subtle problems that happen when
people upgrade ZSH or use NFS mounted home directories.
The ZSH_COMPDUMP variable can also be used to implement `zcompile`
and other fun features in the future.
oh-my-zsh.sh now also checks for $ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme when attempting to load a theme. This way custom themes can be a bit more organized in the 'custom' dir
`config_file` variable will mess up with `cd` auto-complete command.
eg. I have a local dir named `Code`, and when I type `cd co<Tab>`,
config_file will show up, and doesn't make any sense...