Commit graph

5 commits

Author SHA1 Message Date
Marc Cornellà
c90141ed77 fix: escape % characters in git prompts
This patch adds missing % character escaping for custom git prompts
used in a few themes. It also includes escaping for git-prompt.sh.

In combination with CVE-2021-45444, this could allow code execution
when displaying branch information in cloned malicious git repositories.
However, zsh 5.8.1 and newer are largely the default zsh versions, and
on those supported distributions with older zsh versions, the CVE has been
found to be also patched.

For this reason, this doesn't qualify as a security patch, but a
bug fix for proper printing of git branches.
2026-05-28 19:45:47 +02:00
Vanildo Souto Mangueira
28ac0e95da
fix(juanghurtado): Changed text color to red when 'root' (#7104) 2025-09-01 11:31:29 -07:00
Andrew Janke
9f552130bd Move current_branch() from git plugin to core lib/git.zsh
Fixes #4085: core -> plugin dependency issue.
Rename it to git_current_branch for clarity that it's git-specific.
Update all plugins that were calling it to use new name.
Fix variable leaks by making more variables in lib/git.zsh local.
Have lib/git.zsh use [[ ]] instead of [ ] everywhere.
2015-12-14 20:28:37 -05:00
Dan Kerimdzhanov
c249c69065 Remove all copyright information in themes. Closes #2587 2014-03-08 23:51:59 +06:00
Juan G. Hurtado
208b225a2f Custom theme with Git support
This is my personal oh-my-zsh theme. It has Git support through
methods found in Git lib file of oh-my-zsh. It uses:

- parse_git_dirty()
- git_prompt_ahead()
- current_branch()
- git_prompt_short_sha()
- git_prompt_status()

It also shows user name, machine name and current path. You can
take a look at a screenshot at http://goo.gl/ZVoyk
2011-04-29 13:11:38 +02:00