Marc Cornellà
67cc59b425
style: some code style fixes
2022-01-05 09:23:55 +01:00
Marc Cornellà
7ae4f76f6d
refactor(kubectl): optimize completion generation
2022-01-05 09:23:55 +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à
31d63ea884
fix(kubectx): allow prompt sequences in kubectx_mapping ( #10562 )
...
Fixes #10562
2022-01-04 11:53:41 +01:00
Marc Cornellà
a7c46d0ebd
fix(ubuntu): fix defining function based on alias error ( #10560 )
...
Fixes #10560
2022-01-03 17:09:59 +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à
d87ab251c7
fix(kubectx): quote % in kubectx_prompt_info
2022-01-03 14:03:36 +01:00
Marc Cornellà
a280726d93
fix(fossil): refactor fossil_prompt_info and quote % in branch
2022-01-03 14:00:54 +01:00
Marc Cornellà
1c53ef0583
fix(aws): quote % in aws_prompt_info
2022-01-03 13:58:14 +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à
3e9fe6e772
fix(virtualenv): quote % in virtualenv_prompt_info
2022-01-03 13:50:51 +01:00
Marc Cornellà
e7390a8603
fix(jenv): quote % in jenv_prompt_info
2022-01-03 13:50:51 +01:00
Marc Cornellà
42afa6e2ea
fix(pyenv): quote % in pyenv_prompt_info
2022-01-03 13:50:51 +01:00
Marc Cornellà
5b076eab9b
fix(lib): quote % in nvm_prompt_info
2022-01-03 13:50:50 +01:00
Marc Cornellà
304af0a577
fix(lib): quote % in git_remote_status
2022-01-03 13:50:50 +01:00
Marc Cornellà
93ec48fb0a
fix(svn): refactor and quote % characters in svn_prompt_info
2022-01-03 13:50:50 +01:00
Marc Cornellà
c76dc91e02
fix(svn): return true repo name in svn_get_repo_name
2022-01-03 13:50:50 +01:00
Marc Cornellà
75ed59b7c0
fix(svn-fast-info): quote % characters in svn branch name
2022-01-03 13:50:49 +01:00
Marc Cornellà
ef3a85cd42
fix(svn-fast-info): URL-decode svn branch name
2022-01-03 13:50:49 +01:00
Marc Cornellà
596cef84c7
style(svn-fast-info): fix code style and svn info locale
2022-01-03 13:50:49 +01:00
Marc Cornellà
63345c4e5d
ci: disable GitHub Actions on forks
2022-01-03 13:10:53 +01:00
Marc Cornellà
512839ef78
chore: simplify project GitHub Action
2022-01-03 13:08:29 +01:00
Marc Cornellà
9dd1dc49d9
chore: simplify GITHUB_TOKEN env in project GitHub Action
2022-01-03 12:32:37 +01:00
Marc Cornellà
121ee818a5
chore: I'm dumb af
2022-01-02 03:37:16 +01:00
Marc Cornellà
dd7f0f2211
chore: let's try again
2022-01-02 03:32:48 +01:00
Marc Cornellà
17c52ccfc9
chore: look ma no auth!
2022-01-02 03:27:25 +01:00
Marc Cornellà
861e7e24a3
chore: please work
2022-01-02 03:19:46 +01:00
Marc Cornellà
1d35b30461
chore: fix auth in Project tracking Action
2022-01-02 03:17:40 +01:00
Marc Cornellà
95a66532d1
chore: use GITHUB_TOKEN auth for Project Beta GitHub Action
2022-01-02 03:09:52 +01:00
Marc Cornellà
d1c07f9569
chore: add Projects Beta GitHub Action
2022-01-02 02:30:00 +01:00
Marc Cornellà
78c91ccbf9
style(python): fix code style and some hidden bugs
2021-12-31 20:45:12 +01:00
Marc Cornellà
376beafd17
docs(zsh-navigation-tools): remove installation steps from README ( #10549 )
...
Fixes #10549
2021-12-31 20:01:03 +01:00
Marc Cornellà
a01cf85627
fix(rust): use default toolchain when completing cargo
2021-12-29 17:18:21 +01:00
Marc Cornellà
8b53d04942
docs(sudo): document key binding change
2021-12-29 16:26:35 +01:00
Marc Cornellà
4ef188cebf
perf(yarn): skip yarn call if default global bin directory exists ( #10290 )
...
Fixes #10290
2021-12-29 15:19:59 +01:00
Marc Cornellà
c155531402
chore(bazel): update completion to f146202c
2021-12-29 15:07:52 +01:00
Marc Cornellà
bc7bc74469
fix(git-prompt): fix clean prompt when stash is not empty ( #9978 )
...
Fixes #9978
2021-12-29 11:54:13 +01:00
Marc Cornellà
37b278cd03
chore(debian): document previous alias
2021-12-29 11:08:02 +01:00
Marc Cornellà
fe04acd97c
chore: add maintainer for shell-proxy plugin
2021-12-28 22:16:43 +01:00
Marc Cornellà
8861d5c3a7
refactor(rvm): clean up rb* utilities definition and add more versions
2021-12-28 22:13:59 +01:00
7568bbd9f5
feat(ng): get ng completion from parsed help output ( #10294 )
...
Co-authored-by: Yannick Galatol <yannick.galatol@gmail.com >
2021-12-28 20:12:33 +01:00
Marc Cornellà
6515850a14
feat(git-flow): add aliases for current hotfix branch
2021-12-28 19:42:12 +01:00
Marc Cornellà
7a38fa35c4
refactor(git-flow): extract git-flow completion logic
2021-12-28 19:42:12 +01:00
Marc Cornellà
01230fa6e2
style(drush): fix code and README style
2021-12-28 17:49:41 +01:00
Marc Cornellà
c4be9294f2
style(acs): fix style and gitignore __pycache__ folder
2021-12-28 17:46:35 +01:00
Marc Cornellà
364e62155d
refactor(ant): extract completion function
2021-12-28 17:17:05 +01:00
Marc Cornellà
49bae43f62
refactor(plugins): generate completion functions in the background
2021-12-28 14:34:23 +01:00
Marc Cornellà
c06197ad95
chore: fix comment bulk replace
2021-12-28 14:34:09 +01:00
Marc Cornellà
5fbd4c83f6
refactor(cargo): generate completion file in the background
2021-12-28 11:42:58 +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à
8cb53ba692
fix(gnu-utils): reassign GNU utils on preexec ( #10535 )
...
The previous version rebound the `hash` and `rehash` builtins to
reassing GNU utils when they were called. This didn't take into
account that when `$PATH` changes, the commands are rehashed as
well.
This version adds a preexec hook to reassign the GNU utilities
before running any command, if and only if they aren't already
reassigned. This is checked by looking at the `whoami` command.
Fixes #10535
2021-12-27 17:34:06 +01:00
Marc Cornellà
0f1de08713
fix(gnu-utils): always reapply GNU coreutils on rehash
2021-12-26 23:29:58 +01:00
Marc Cornellà
f85087005a
fix(installer): fix POSIX shell syntax of previous commit
2021-12-26 23:27:49 +01:00
Marc Cornellà
ba069e7731
fix(installer): don't hard-code user $HOME directory on install
2021-12-26 22:40:38 +01:00
Marc Cornellà
2e0cf4a3b0
refactor(golang): move completion out of the plugin
2021-12-26 20:38:36 +01:00
Marc Cornellà
c9a1edeab8
fix(golang)!: rename gop alias to gopa to avoid conflict with Go+ ( #10504 )
...
BREAKING CHANGE: the `gop` alias has been renamed to `gopa` to avoid conflict with
Go+ `gop` command.
Fixes #10504
2021-12-26 20:38:01 +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
Marc Cornellà
70dfb6ef92
refactor(composer): improve completion and use official Zsh completion if available
2021-12-26 18:58:54 +01:00
Marc Cornellà
5f6b0ac7fb
style(composer): fix code and README style
2021-12-26 18:58:12 +01:00
Marc Cornellà
e9bc107ad5
fix(dirhistory): define key bindings for vi mode ( #10450 )
...
Fixes #10450
2021-12-26 18:29:55 +01:00
Marc Cornellà
8ae373130c
fix(cli): respect ZDOTDIR in plugin/theme change commands ( #10520 )
...
Fixes #10520
2021-12-21 17:01:56 +01:00
Marc Cornellà
41c15a2159
fix(jonathan): fix top bar alignment with RPROMPT
2021-12-16 10:51:25 +01:00
Marc Cornellà
4b4cc9a4a5
fix(cli): fix plugin and theme suggestions in completion for older zsh versions
2021-12-16 10:50:34 +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
Marc Cornellà
9a3d853481
fix: quote % characters in ruby prompt info functions
2021-12-13 17:43:32 +01:00
Marc Cornellà
59cb231692
style(rbenv): adapt to code style
2021-12-13 17:42:17 +01:00
Marc Cornellà
5c14474eb2
style(chruby): fix plugin code style and loading process
2021-12-13 17:37:44 +01:00
Marc Cornellà
7b12fa9799
style(rbfu): clean up code
2021-12-13 17:14:25 +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à and Tom Payne
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
Marc Cornellà
428f815169
fix(lib): %-quote git prompt functions
2021-12-13 11:26:55 +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
Marc Cornellà
5b987e59d0
chore: add ohmyzsh GitHub Sponsors to FUNDING.yml
2021-12-07 20:15:38 +01:00
Marc Cornellà
90e53bcc6a
ci(spelling): turn off check-spelling action temporarily
2021-12-07 19:37:28 +01:00
Marc Cornellà
29b344a710
chore: update security docs and link to huntr.dev
2021-12-07 18:04:33 +01:00
Marc Cornellà
e253661a9b
Revert "ci: add check-spelling GitHub Action"
...
This reverts commit aef393bdce .
2021-12-01 12:25:58 +01:00
Marc Cornellà
aef393bdce
ci: add check-spelling GitHub Action
2021-12-01 12:20:46 +01:00
Marc Cornellà
1c1d74c5ec
chore: update new issue templates
2021-11-30 10:34:45 +01:00
Marc Cornellà
f0f792fa6b
feat(cli): add omz version command
2021-11-30 10:13:23 +01:00
Marc Cornellà
2b96b7c54b
fix(updater): stop update if $ZSH is not a git repository ( #10448 )
...
Fixes #10448
2021-11-25 23:36:38 +01:00
Marc Cornellà
15fd9c84de
style(bundler): simplify bundled_commands array operations
2021-11-17 13:09:25 +01:00
Marc Cornellà
98b4801548
fix(bundler): use BUNDLE_JOBS in bi to avoid config file change
...
When calling `bundle install` with `--jobs=<n>`, bundle persists this
argument in `.bundle/config`. If we run `BUNDLE_JOBS=<n> bundle install`
instead, this is not persisted.
Fixes #10425
2021-11-17 13:09:25 +01:00
Marc Cornellà
88e72e8a54
fix(docker-compose)!: check for old command instead of calling docker ( #10409 )
...
BREAKING CHANGE: the plugin now checks for the `docker-compose` command instead
of trying whether `docker compose` is a valid command. This means that if the
old command is still installed it will be used instead. To use `docker compose`,
uninstall any old copies of `docker-compose`.
Fixes #10409
2021-11-17 11:05:25 +01:00
Marc Cornellà
b60b3f1842
fix(osx): deprecate osx plugin without symlink ( #10428 )
...
Fixes #10428
2021-11-17 10:53:17 +01:00
Marc Cornellà and Jeff Warner
60b89cd264
feat(ssh-agent): add quiet option to silence plugin ( #9659 )
...
Closes #9659
Co-authored-by: Jeff Warner <jeff@develops.software >
2021-11-17 09:55:39 +01:00
Marc Cornellà
fb12e41353
fix(install): fix backslash in printf when showing logo ( #10422 )
...
Fixes #10422
2021-11-16 19:24:32 +01:00
Marc Cornellà
2c06852546
style(dirhistory): remove use of eval completely
2021-11-16 17:18:07 +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à
72928432f1
fix(plugins): fix potential command injection in rand-quote and hitokoto
...
The `rand-quote` plugin uses quotationspage.com and prints part of its content to the
shell without sanitization, which could trigger command injection. There is no evidence
that this has been exploited, but this commit removes all possibility for exploit.
Similarly, the `hitokoto` plugin uses the hitokoto.cn website to print quotes to the
shell, also without sanitization. Furthermore, there is also no evidence that this has
been exploited, but with this change it is now impossible.
2021-11-11 22:45:24 +01:00
Marc Cornellà
a263cdac9c
fix(lib): fix potential command injection in title and spectrum functions
...
The `title` function unsafely prints its input without sanitization, which if used
with custom user code that calls it, it could trigger command injection.
The `spectrum_ls` and `spectrum_bls` could similarly be exploited if a variable is
changed in the user's shell environment with a carefully crafted value. This is
highly unlikely to occur (and if possible, other methods would be used instead),
but with this change the exploit of these two functions is now impossible.
2021-11-11 22:45:11 +01:00