Check if Zsh is installed before installing anything else.
New-commers, or people who don't read the disclaimers(ex. me) will go
straight to stack overflow if chsh -s returns an error.
Problem
On detached-refs, the git prompt is very slow because it uses a command
to output all refs, which takes 32s on the twitter internal git repo.
Solution
Use git-rev-parse instead of git-show-ref to only output the head ref.
Runtime drops to 0.03 seconds.
Note
Interestingly, git-rev-parse isn't slow without the --head arguement so
I'll probably be cooking up a patch for the git team to speed this up
eventually, but it's still pointless to sigpipe git as it walks the
filesystem.
A few spelling fixes, grammatical fixes (what's with all the ellipses?), some standardization of capitalization, and a few other tweaks.
As well, I changed all standalone code fragments into proper code blocks.
I also added a missing theme image!
Installation previously assumed the existence of a "chsh" command in the current
${PATH}. Since Cygwin does *NOT* provide this command, installation now tests
for the existence of this command before attempting to run it.
For safety, a umask of 022 prohibiting both group and other writability is now
enforced during OMZ installation. In theory, this should reduce the likelihood
of subsequent compinit() failures due to insecure directory permissions under
all platforms except for default Cygwin installations (in which Windows ACLs
override POSIX umasks).
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.