1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-24 14:50:07 +00:00
Commit graph

808 commits

Author SHA1 Message Date
Kuri Schlarb
303ae79712
fix(ys): fix $VIRTUAL_ENV check if nounset is enabled (#9915) 2022-01-27 21:48:42 +01:00
Mathias Neerup
d4f5fa37e8
feat(simple): add color to git status indicator (#4962)
Closes #4962
2022-01-24 11:47:30 +01:00
GitHubLeakedPAN, GitHubLeakedMyautsai
4e0f19cf92
feat(ys): show svn repository information (#10582) 2022-01-22 21:56:36 +01:00
Marc Cornellà
9c84c344d7
fix: disable log.showSignature in git log calls 2022-01-10 19:39:05 +01:00
WeZZard
971683762e
fix(avit): disable log.showSignatures in _git_time_since_commit (#10072) 2022-01-10 18:38:35 +01:00
Marc Cornellà
d3bb52d7d8
style: declare globals properly
By default, `typeset` defines variables locally unless in the main scope.
This is specially bad when using `omz plugin load`, which happens inside
a function, so the declared variables don't continue being defined when
the function finishes and the main scope reappears.
2022-01-05 09:23:54 +01:00
Marc Cornellà
8e973d42bd
fix(bureau): fix status variable name causing error (#10561)
Also cleaned up the code a bit

Fixes #10561
2022-01-03 17:05:48 +01:00
Marc Cornellà
a9d57eb2ee
fix: quote % in box_name prompt functions 2022-01-03 13:50:52 +01:00
Marc Cornellà
43be5ea321
fix(bureau): quote % in git prompt function and remove global variables 2022-01-03 13:50:52 +01:00
Marc Cornellà
4e777ef9d6
fix(trapd00r): fix potential command injection in zsh_path 2022-01-03 13:50:52 +01:00
Marc Cornellà
9836aebe67
fix(agnoster): quote % in prompt functions 2022-01-03 13:50:52 +01:00
Marc Cornellà
634296be3c
fix(random): fix negated logic in ZSH_THEME_RANDOM_QUIET 2021-12-28 11:04:13 +01:00
Marc Cornellà
96e473a1d6
fix(random): fix ZSH_THEME_RANDOM_QUIET check (#10534)
BREAKING CHANGE: For consistency, `ZSH_THEME_RANDOM_QUIET` now needs to
be `true` if you want to silence the "Random theme loaded" message in the
`random` theme.

The wiki specified that 1 or true was valid, while the code just
checked whether it was set to any value. Being more strict makes
sure that we're consistent with the rest of the Settings.

Fixes #10534
2021-12-26 19:27:31 +01:00
rutriff
a1ec96d125
fix(af-magic): add space before git and hg information (#9396)
Closes #9396
2021-12-21 16:48:19 +01:00
Marc Cornellà
41c15a2159
fix(jonathan): fix top bar alignment with RPROMPT 2021-12-16 10:51:25 +01:00
Marc Cornellà
7d03ea18ed
fix: declare variables as global when using typeset
Fixes fb86ec77
2021-12-16 10:16:53 +01:00
Marc Cornellà
fb86ec7749
style: use typeset for dynamic variable names 2021-12-14 13:09:02 +01:00
deimosian
f42aa49cfd
fix(ys): use default color instead of gray for improved readability (#10506) 2021-12-13 22:52:32 +01:00
Marc Cornellà
e3bb6e685d
refactor(themes): use ruby_prompt_info everywhere 2021-12-13 17:14:25 +01:00
Marc Cornellà
aa99472c8a
style(simonoff): fix code style and optimize use of variables 2021-12-13 17:08:53 +01:00
Marc Cornellà
134c1ada28
fix(jonathan): fix theme for non-UTF8 locales 2021-12-13 17:08:52 +01:00
Marc Cornellà
065e8ebdd0
style(jonathan): fix code style in jonathan theme 2021-12-13 17:08:52 +01:00
Marc Cornellà
1b01496c21
fix(bira): fix color bleed in user_host prompt section (#10505)
Fixes #10505
2021-12-13 14:42:57 +01:00
Marc Cornellà
a94e263426
refactor(adben): simplify used variables and %-quote prompt functions
Closes #10474

Co-authored-by: Tom Payne <twpayne@gmail.com>
2021-12-13 11:28:51 +01:00
Frank Van Damme
a1a63f4c7d
feat(afowler): add mercurial support
Closes #5992
2021-12-13 11:17:13 +01:00
Marc Cornellà
ee46d198ad
style(afowler): simplify code and remove unnecessary variables 2021-12-13 11:10:47 +01:00
Marc Cornellà
c172624398
style(af-magic): fix code style and remove unnecessary variables 2021-12-13 11:04:51 +01:00
Marc Cornellà
4119f53004
perf(mercurial): optimize utility functions 2021-12-13 10:50:50 +01:00
Romain Failliot
137b45672d
feat(bira): improve theme and add support for mercurial (#6631)
Added the red dot (instead of the default `*`) if the branch is dirty.

The bira theme only supported git, now it supports mercurial as well. It
needed ito call `hg_prompt_info` and the `ZSH_THEME_HG_PROMPT_`
variables.

Closes #6631
2021-12-13 10:50:18 +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
Marc Cornellà
b3ba9978cc
fix(themes): fix potential command injection in pygmalion, 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.
2021-11-11 22:45:40 +01:00
Marc Cornellà
3dc66bd367
fix(emotty): fix glyphs output width in emotty theme 2021-11-09 10:25:23 +01:00
Janusz Mordarski
4a74349635
feat(refined): allow selecting git branch by changing prefix to : (#10400) 2021-11-09 09:50:25 +01:00
Aaron Hutchinson
5e8905b4b2
feat(ys): increase color contrast with light color schemes (#10295) 2021-11-02 19:40:40 +01:00
Igor Gavelyuk
dbf555438e
feat(obraun): display time with leading zeros (#10289) 2021-10-13 10:00:46 +02:00
Marc Cornellà
72b8f0b73b
fix(half-life): fix prompt color bleeding and code clean up (#10085)
Fixes #10085
Closes #10223

Co-authored-by: valdaarhun <icegambit91@gmail.com>
2021-09-30 15:23:11 +02:00
Bartek Pacia
c47ac2d86d
feat(mlh): let users configure the official MLH theme (#9997) 2021-08-25 10:25:26 +02:00
Bartek Pacia
adcb5c5e07
style(mlh): update the official theme of Major League Hacking (#9971)
* allow for customization of RPROMPT (exit code and timestamp)

* improve code and comments
2021-06-13 10:16:34 -07:00
Keita Urashima
059ee71fc8
fix(gentoo): fix the color of the prompt symbol (#9885)
This commit fixes an issue where the prompt symbol is white when vcs_info is displayed in the gentoo theme.
2021-05-28 11:14:58 +02:00
MrAureliusR
0e5fed193e
feat(ys): add virtualenv prompt info (#8453) 2021-04-23 15:51:31 +02:00
Kirk
b3d1826a43
feat(ys): add setting to hide dirty info in hg repositories (#8415)
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.
2021-04-23 15:22:18 +02:00
Thomas De Backer
12669f29f0
fix(gentoo): fix tab color completion (#9810)
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>
2021-04-11 19:40:27 +02:00
Marc Cornellà
69507c9518
refactor(adben): refactor theme and degrade gracefully on missing dependencies (#9734) 2021-03-28 15:28:01 +02:00
Marc Cornellà
02d07f3e3d
fix: use $USERNAME guaranteed to always be defined in zsh
Fixes #9701
2021-03-25 12:08:00 +01:00
Marc Cornellà
3bb5e97762
feat(gentoo)!: use vcs_info to support other VCSs (#9440)
* prettify vcs infomation using `vcs_info`

* Show symbol when there are untracked files in git

Co-authored-by: freeyoung <ourbaozi@qq.com>
2021-03-13 13:51:26 +01:00
Marc Cornellà
c52e646bb7
refactor(gallois): clean up theme and fix typos 2021-01-31 19:55:13 +01:00
Sébastien MB
172b32c90d
feat(essembeh): update theme with new features (#9595)
- 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
2021-01-16 21:52:11 +01:00
Sreekanth S
c66d8a841d
agnoster: fix icon for unstaged git status (#9164) 2020-10-10 21:39:21 +02:00
Marc Cornellà
fbb2b56c7e fino: stop bold with prompt sequence
Fixes weird bug when completing.
2020-10-05 12:05:47 +02:00
Matsievskiy S.V
b4093819a8
fino: fix dangling "using" and clean up (#9307)
Co-authored-by: Matsievskiy S.V <matsievskiysv@gmail.com>
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-10-05 11:42:22 +02:00
Marc Cornellà
d14bddf6d7 agnoster: allow disabling AWS prompt with SHOW_AWS_PROMPT=false
Fixes #8040
2020-09-26 12:25:30 +02:00
Marc Cornellà
bcc859e012 avit: reenable use of $fg instead of prompt sequence colors to fix weird bug
Fixes #9232
2020-09-26 12:15:59 +02:00
Marc Cornellà
93c837fec8 random: add ZSH_THEME_RANDOM_QUIET setting
Fixes #9180

Co-authored-by: James Eapen <jamespeapen@gmail.com>
2020-09-20 13:41:21 +02:00
Marc Cornellà
bc9d4b89bb Remove racially-charged language from the codebase
The ZSH_THEME_RANDOM_BLACKLIST variable will be deprecated until it's
removed 2 months from now.
2020-09-18 19:43:44 +02:00
Marc Cornellà
7256c03ce1 fishy: fix one-level directory bug and bad array assignment in zsh 5.0.1 2020-09-02 15:15:24 +02:00
Marc Cornellà
a7f5170d68 Remove perl dependency 2020-09-01 11:52:32 +02:00
Florian Klink
4ed6fd2b8b
pygmalion: use pure zsh instead of perl (#9210)
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-08-29 00:27:06 +02:00
Marc Cornellà
69a380771e Remove non-existing %p prompt sequence from themes
Fixes #8022
2020-08-04 15:55:04 +02:00
Larson Carter
7afaee858a
Bug and Feature Request Templates + MLH Theme + Readme (#9068)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
Co-authored-by: Bartek Pacia <barpac02@gmail.com>
2020-07-05 17:59:12 +02:00
Kyle Laker
d24a9dbccc
agnoster: fix git working tree check (#9072)
`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>
2020-07-01 19:05:53 +02:00
Marc Cornellà
0f3c424e4c muse: clean up theme 2020-06-10 12:57:01 +02:00
Marc Cornellà
a2a83be982 smt: fix time since last commit logic
Fixes #5244
2020-06-09 19:36:16 +02:00
Marc Cornellà
374b4e02ef peepcode: add virtualenv prompt and fix git calls 2020-06-08 20:36:27 +02:00
Yauhen
5d1cdb22c1
fino-time: fix virtualenv prompt by escaping dollar sign (#8991) 2020-06-03 17:40:05 +02:00
Marc Cornellà
8cb449ee20 avit: fix $reset_color sequence in prompt
Fixes #8952
2020-05-23 18:02:54 +02:00
Marc Cornellà
4ac36d57f1 fino-time: fix git and ruby prompt sequences
Fixes #8856
2020-05-22 19:52:13 +02:00
Marc Cornellà
b721053c87 af-magic: account for active conda envs in dash line
See https://github.com/ohmyzsh/ohmyzsh/issues/8081#issuecomment-632182715
2020-05-21 20:48:46 +02:00
Marc Cornellà
c52441b624 pygmalion: revert multiline prompt change
Fixes #2317
Closes #2321
2020-05-10 20:06:24 +02:00
Marc Cornellà
d247f98d3e nebirhos: use short hostname in prompt
Fixes #6050
2020-03-26 12:39:51 +01:00
Marc Cornellà
4009668500 random: remove random theme from possible themes to choose from
...preventing an infinite loop.
2020-03-02 23:53:43 +01:00
Julian Parsert
dbd2f77bd9
norm: add hg prompt (#6725) 2020-02-27 18:28:08 +01:00
Marc Cornellà
d959283898 avit: fix prompt sequence (fixes #8678) 2020-02-25 12:21:06 +01:00
Marc Cornellà
3d4890dcc0 Add blacklist variable for random theme
Co-authored-by: Fran Garcia <fran.miranda@gmail.com>
2020-02-19 20:00:22 +01:00
Marc Cornellà
b297bf9296 Add themes in $ZSH_CUSTOM to the pool of candidates
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>
2020-02-19 19:34:16 +01:00
Willy Weiskopf
6adad5c300 Move random theme functionality into "random" theme
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.
2020-02-19 18:20:28 +01:00
Marc Cornellà
d76258ff55 avit: add years since last commit if appropriate 2020-02-19 18:19:46 +01:00
Marc Cornellà
77813a330b avit: clean up theme code 2020-02-19 17:24:20 +01:00
Marc Cornellà
443ad88024 avit: replace custom prompt functions with OMZ ones
Fixes #8637
2020-02-19 16:53:32 +01:00
Marc Cornellà
c1b798aff3
agnoster: fix bzr prompt with breezy installed (#8646)
* Change indentation to 2 spaces in prompt_bzr function
* Check if in a bzr repository and optimize bzr calls in prompt_bzr
2020-02-19 00:16:54 +01:00
Marc Cornellà
de261bd29c af-magic: fix virtualenv prompt suffix 2020-02-18 22:28:58 +01:00
Marc Cornellà
d49397a01d af-magic: fix dashed separator sizing and refactor
Fixes #8081
2020-02-18 19:18:23 +01:00
Marc Cornellà
05cae34676 Detect dependency plugins in candy-kingdom and kiwi themes
Fixes #5029
Fixes #5342
2020-02-11 17:43:59 +01:00
Aliaksei Maiseyeu
6bebc254e8
af-magic: fix showing aws prompt out of the box (#8243)
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.
2020-02-04 13:27:18 +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
Jacob Tomaw
1ba0af650a Use safer append to hook function arrays (#8406)
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>
2019-11-19 18:47:12 +01:00
Isaac Clayton
ef96a38fa5 Upgrade some URLs to HTTPS (#8202)
* Update http to https in Solarized
* Upgrade http to https for 'Burger In Your Shell'
* Upgrade http to https for tmux.github.io
2019-11-08 15:42:02 +01:00
Shriniwas Sharma
f7d9dae12e bira: move virtualenv information (#8266) 2019-10-16 09:28:19 +02:00
nv035674
32338fd40c robbyrussell: restore prompt spacing (#8148) 2019-09-13 23:30:17 +02:00
Hanjiang Yu
c44569f06e robbyrussell: remove local variable (#8131)
Now it can be sourced in a function, like zplug.
2019-09-08 15:07:33 +02:00
Sean Collins
9c3e3ae5e4 Change description for Evan's theme to something neutral (#6304) 2019-09-08 15:05:20 +02:00
Matthew Armand
43ed0b455e af-magic: add hg prompt and tweak virtualenv info (#8056)
- Add mercurial support to af-magic, so now the vcs prompt will show up in either a git or hg repository
- The virtualenv prompt was white and bumped up against the user@hostname output
- Fixed that so its green (which I thought highlighted it more thematically) and has a space before user@hostname
2019-08-19 18:54:49 +02:00
Marc Cornellà
89366be43f
Revert "agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)" (#8061)
This reverts commit 59c1ec80aa.
2019-08-06 18:01:32 +02:00
Rocky
59c1ec80aa agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)
Fixes #7985
2019-07-31 09:23:50 +02:00
Marc Cornellà
17f4cfca99
af-magic: make separator window-size-aware (#7739) 2019-07-13 12:48:10 +02:00
Crackpot
9060c1ddae crcandy: use 24h format in prompt (#7926) 2019-06-14 14:46:08 +02:00
Andrew Janke
299cd4777a Themes: switch to using ruby_prompt_info()
Changes themes displaying RVM or other Ruby version info to use the central
ruby_prompt_info function. This supports more Ruby versioning mechanisms,
reduces copy-and-paste code, and avoids "zsh: no such file or directory: rvm-prompt"
when run on machines that do not have RVM installed.

Changes the prefix/suffix variable names to ZSH_THEME_RUBY_PROMPT_PREFIX and
ZSH_THEME_RUBY_PROMPT_SUFFIX, since they apply to all Ruby versioning mechanisms,
not just RVM.

Allows empty ZSH_THEME_RUBY_PROMPT_PREFIX and ZSH_THEME_RUBY_PROMPT_SUFFIX.
2019-05-08 08:45:34 +02:00
David Dejori
8db0f352e8 agnoster: remove empty line (#7775) 2019-04-18 18:27:20 +02:00
KillWolfVlad
ebee94b8cf bira: remove extra spaces (#7767) 2019-04-16 21:54:09 +02:00
Marc Cornellà
b57c0ac6e2
Delete deprecated pure theme 2019-04-10 21:26:56 +02:00
Marc Cornellà
0c3499ecd9
Fix showing aws prompt out of the box for 'fishy' theme (#7747)
This fixes the RPROMPT setting for fishy theme so as to preserve its old value,
instead of overwriting it like it did before.

Also, fix unnecessary export of RPROMPT in aws plugin.
2019-04-09 22:20:00 +02:00