Commit graph

39 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
ohmyzsh[bot]
d689aa289e
feat(gitfast): update to version v2.2 (#12923)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
2025-01-19 11:20:14 +01:00
Felipe Contreras
2a71aa5017
chore(gitfast): remove update script (#12262)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2024-03-07 09:47:15 +01:00
ohmyzsh[bot]
f43ee85d8f
feat(gitfast): update to version v2.0 (#12135)
Co-authored-by: ohmyzsh[bot] <54982679+ohmyzsh[bot]@users.noreply.github.com>
2023-12-28 22:05:07 +01:00
Felipe Contreras
b74a15a80e
feat(gitfast): update to git-completion 1.3.7 (#11114) 2022-08-14 17:00:30 +02:00
Felipe Contreras
6f9650d940
fix(gitfast): update to git-completion 1.3.6 (#10633) 2022-01-28 13:45:05 +01:00
Marc Cornellà
c06197ad95
chore: fix comment bulk replace 2021-12-28 14:34:09 +01:00
Curtis Rueden
2d32e9be66
refactor: handle $0 according to the Zsh plugin standard (#10518)
For details and rationale, see:
https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html

Closes #10518
2021-12-28 12:29:24 +01:00
Josh Soref
0e41181d54
chore: fix spelling errors across the project (#10459)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-01 12:20:31 +01:00
Felipe Contreras
e92a4667cb
feat(gitfast): update to git-completion 1.2 (#9458)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2020-11-19 19:45:19 +01:00
Felipe Contreras
d055445625
gitfast: fetch latest fixes from git-completion (#9390)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2020-10-27 11:14:39 +01:00
Felipe Contreras
66f9fdabc1
gitfast: improve command aliases (#9385)
So that compdefs with dashes work as well as underscores:

  compdef _git gc=git_commit

Or:

  compdef _git gc=git-commit

The official Zsh Git completion uses dashes, and this way people don't
have to change their existing definitions.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2020-10-24 16:33:43 +02:00
Felipe Contreras
a32564e0ae
gitfast: update to latest upstream and more (#9382) 2020-10-24 14:12:23 +02:00
Felipe Contreras
0736a3749a
gitfast: proper synchronization (#8550) 2020-05-05 20:32:52 +02:00
Marc Cornellà
610b2529d2 Clean up plugin READMEs and a few plugins
- fasd
- history
- mercurial
- pylint
- repo
- yii2
2020-03-11 19:57:46 +01:00
Marc Cornellà
b80b1a1e8b Actions to take after repository migration is complete (#8394)
* Change project URL from robbyrussell to ohmyzsh org

* Update git remote to use ohmyzsh org repository
2019-11-20 17:26:18 -08:00
Marc Cornellà
f9e133b88a
gitfast: fix error in git-prompt.sh (#8132)
An error was thrown (`bash: [: =: unary operator expected`) when using the __git_ps1_colorize_gitstring function outside of the one place it's called (line 512), because the "detached" variable was not quoted, and was unset.
2019-09-08 20:29:43 +02:00
Marc Cornellà
4fb50b3333
Unquote yes in conditional expressions for style consistency 2019-09-08 20:28:59 +02:00
Prajjwal Singh
229a1c9719 gitfast: update completions (#8130)
Includes completions for `git switch`.
2019-09-08 16:16:00 +02:00
Addison G
1f58cd92dd
Updated git-prompt.sh to quote variables
An error was thrown (`bash: [: =: unary operator expected`) when using the __git_ps1_colorize_gitstring function outside of the one place it's called (line 512), because the "detached" variable was not quoted, and was unset.
2019-09-06 14:12:56 +10:00
Felipe Contreras
d69bad8eb4 gitfast: downgrade to upstream v2.16 (#7918)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-08 16:33:56 +02:00
Felipe Contreras
eb3d463081 gitfast: update to upstream v2.21 (#7914)
* gitfast: use $OSTYPE again

In the last update to upstream this was reverted:

 a56eac7a (Use OSTYPE instead of uname whenever possible for better speed. (#5496))

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

* gitfast: simplify plugin

No need to set and unset a variable we use once.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

* gitfast: add script to update from upstream

This would make easier the process of updating, and also not miss our
patches.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

* gitfast: update to upstream v2.21

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2019-06-07 17:57:46 +02:00
Marc Cornellà
7b06d01f8f
gitfast: document deprecated git plugin dependency 2019-04-09 11:28:35 +02:00
Marc Cornellà
8c95c2b6cb
gitfast: update plugin (#7152)
* Stop loading git plugin
* Update completion and git-prompt to v2.10
* Update completion to v2.14
2019-04-08 20:06:17 +02:00
Forrest Wolf
a0c1eb3230 Add README.md to the gitfast plugin (#7241)
* Create gitfast readme

* Add list of gitfast aliases
2018-10-06 09:12:45 -07:00
Hong
a56eac7a71 Use OSTYPE instead of uname whenever possible for better speed. (#5496) 2016-10-10 22:24:30 +02:00
Felipe Contreras
36e29fbc19 completion: zsh: improve main function selection
Sometimes we want to use the function directly (e.g. _git_checkout), for
example when zsh has the option 'complete_aliases', this way, we can do
something like:

  compdef _git gco=git_checkout

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2016-05-19 23:53:47 -05:00
Felipe Contreras
079fef48df gitfast: fix the prompt colour
We can add colour in Zsh without the need of pcmode.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2016-05-19 23:53:40 -05:00
Felipe Contreras
eec3dc607c gitfast: update to upstream v2.8
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2016-05-19 23:27:30 -05:00
Felipe Contreras
169cd8b6ca gitfast: update to upstream v2.4
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2016-05-18 03:07:09 -05:00
Felipe Contreras
0b5d18a247 gitfast: update to upstream v2.0
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2016-05-17 20:27:18 -05:00
Michael Okner
3d670c0bfc Adding quotes to git completion discovery path
Previously, spaces in the path would result in wto separate errouneous
paths being parsed. This fixes that issue.
2015-06-13 08:59:10 -05:00
Felipe Contreras
5918d9100b gitfast: back-port prompt fix
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2014-04-21 21:13:06 -05:00
Felipe Contreras
6a5c8fb81b gitfast: update to upstream v1.9.2
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2014-04-21 21:11:49 -05:00
Felipe Contreras
9ebdbec589 gitfast: update to upstream v1.8.4
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-08-23 22:00:11 -05:00
Felipe Contreras
c944f8b465 gitfast: fix prompt
Certain themes need the 'clean' mark, and some people like to have the
'dirty' one, just like the original git_promp_info().

We probably shouldn't be modifying that function, there's no other clean
way to achieve our own status information, so let's try to emulate the
original as much as possible.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-04-21 02:57:05 -05:00
Felipe Contreras
72a8c08cc8 gitfast: synchronize with upstream
Up to version 1.8.2.1.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-04-21 02:57:05 -05:00
Filipe Chagas
d0842b431e Fix gitfast problem for untracket files
When showing the char % for untracket files, it was not being escaped
so there was shown a space in the place. It was also removing any char
that was right just after.
2012-12-28 17:37:48 -02:00
Felipe Contreras
5a11228e93 Add gifast plugin
Using the upstream git completion and prompt stuff.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2012-11-22 17:45:37 +01:00