On large mercurial projects, using `hg status` to show dirty prompt
causes significant delay.
This commit checks a local hg config value of `oh-my-zsh.hide-dirty` to
skip dirty check.
Users who wish to skip dirty check can add this to their `.hg/hgrc`
file.
```
[oh-my-zsh]
hide-dirty = 1
```
This config value uses the same naming as ones found for git, in file
lib/git.zsh.
This commit fixes an issue in the gentoo theme introduced in 3bb5e977.
Due to incorrect line width calculations, colors are incorrectly applied
when using tab.
Fixes#9778
Signed-off-by: Thomas De Backer <mosterdt@debacker.me>
- single line
- quite simple by default: user@host:$PWD
- green for local shell as non root
- red for ssh shell as non root
- magenta for root sessions
- prefix with remote address for ssh shells
- prefix to detect docker containers or chroot
- git plugin to display current branch and status
My system doesn't have `perl` in $PATH, so using this theme clutters the
shell output quite a bit.
Turns out, the same thing can be accomplished in pure zsh (with
extendedglob).
Co-Authored-By: Marc Cornellà <marc.cornella@live.com>
`git rev-parse --is-inside-work-tree` does not have a different exit
code when not within a work tree; the difference is in the output,
either "true" when in a work tree, or "false" when not.
The if was modified similarly to the check for the hide-status config,
which also parses command output rather than exit code.
Co-authored-by: Kyle Laker <klaker@easydynamics.com>
Also add comments and unset leftover variables, and print only the
name of the theme loaded.
When looking for $ZSH_CUSTOM themes, the chosen algorithm is to add
the theme names to the pool disregarding the path, and then source
whatever theme is selected with the same logic as the init script,
which is to source first custom themes even if there is another
default theme of the same name.
Co-authored-by: Mihai Serban <mihai.serban@gmail.com>
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.
Fix issue related to #7615, #7747 and #6346
After the update, aws prompt (which should be visible out of the box) disappears when a user uses a theme af-magic, because of fact that plugins are loaded before themes.
This pull request fixes issue with not showing aws prompt in theme af-magic, by appending RPROMPT in theme af-magic instead overwriting.