summaryrefslogtreecommitdiff
path: root/themes/pygmalion.zsh-theme
AgeCommit message (Collapse)Author
2024-07-12refactor(pygmalion): simplify theme logic and prompt sequences (#12550)Marc Khouri
* Simplify Pygmalion Theme The Pygmalion theme previously had some logic for counting line length and taking action based on line length. The action was removed in c52441b624c0b1fa075bc6110032bd4e75311909, but the counting still needlessly happens. This commit removes the code to count line length, and simplifies the Pygmalion theme by moving the "precmd" into the setup. As a bonus unintended side effect, this makes the Pygmalion theme compatible with the current async prompting logic (i.e. after this change, Pygmalion is no longer affected by https://github.com/ohmyzsh/ohmyzsh/issues/12328) * refactor(pygmalion): redo and simplify prompt sequences With this commit we put the minimal needed color resets, i.e. only when we don't control the previous text we need to do a full reset. Otherwise we can just use %F{} to change only the foreground color. Co-authored-by: Marc Cornellà <marc@mcornella.com>
2021-11-11fix(themes): fix potential command injection in `pygmalion`, ↵Marc Cornellà
`pygmalion-virtualenv` and `refined` The pygmalion and pygmalion-virtualenv themes unsafely handle git prompt information which results in a double evaluation of this information, so a malicious git repository could trigger a command injection if the user cloned and entered the repository. A similar method could be used in the refined theme. All themes have been patched against this vulnerability.
2020-08-29pygmalion: use pure zsh instead of perl (#9210)Florian Klink
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>
2020-05-10pygmalion: revert multiline prompt changeMarc Cornellà
Fixes #2317 Closes #2321
2019-11-19Use safer append to hook function arrays (#8406)Jacob Tomaw
Use add-zsh-hook to add functions to hooks. That way they won't be added again when doing `source ~/.zshrc` multiple times. Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2014-09-01fix missing add-zsh-hook in pygmalion.zsh-themeLetian Zhang
Fix "command not found: add-zsh-hook" since #3053 removes `autoload -U add-zsh-hook`
2011-12-29correctly handle path names with spacesPhilip Hofstetter
2011-12-28make pygmalion theme use two lines when neededPhilip Hofstetter
if the length of the prompt (excluding color escapes) exceeds 40 characters, emit the arrow prompt on its own line This helps a lot on smaller terminals
2011-12-09forks miloshadzic theme to add more directory info as well as user and host infoDominick LoBraico