Marc Cornellà
ac82e156ca
style(systemadmin): use function to avoid alias conflicts
2022-04-13 13:14:38 +02:00
Marc Cornellà and GitHub
846f417eb8
feat(updater): check for typed input before automatically updating ( #10830 )
2022-04-10 10:20:51 +02:00
Marc Cornellà and GitHub
4d9e5ce9a7
ci(project): sort issues and PRs when reopened
2022-04-04 21:40:08 +02:00
Marc Cornellà
53863e7b3f
chore: remove obsolete spelling-action files
2022-03-31 14:01:17 +02:00
Marc Cornellà
6fa5a4f71d
chore(sprunge): fix Internet Archive URL
2022-03-31 12:35:26 +02:00
Marc Cornellà and inclusive-coding-bot
e079babdce
chore: fix some instances of bad wording
...
Co-authored-by: inclusive-coding-bot <inclusive-coding-bot@github.com >
2022-03-31 12:31:09 +02:00
Marc Cornellà and GitHub
9e967b4ecc
fix(installer): exit install directory on setup ( #10804 )
2022-03-28 16:33:03 +02:00
Marc Cornellà
a64d940377
refactor(1password): extract opswd function
2022-03-26 15:10:56 +01:00
Marc Cornellà
3459768745
perf(dash): improve dash completion performance
2022-03-14 13:19:00 +01:00
Marc Cornellà
c4699f8ee1
fix(dash): fix "no application knows how to open URL" error ( #10767 )
...
Fixes #10767
2022-03-14 13:19:00 +01:00
Marc Cornellà
c10241f3d1
chore: add Carlo sponsorship
2022-03-10 12:58:46 +01:00
Marc Cornellà
40f49342f5
fix(rails): bundle more up-to-date zsh-completions completion version
...
Source: https://github.com/zsh-users/zsh-completions/blob/55d07cc/src/_rails
2022-03-07 22:37:04 +01:00
Marc Cornellà
47d313c904
chore(rails): fix comments and docs
2022-03-07 22:37:04 +01:00
Marc Cornellà
4f0b680248
fix(installer): fix $HOME setting if getent is not found (macOS)
...
Related: https://github.com/ohmyzsh/ohmyzsh/pull/10713/files#r820219899
2022-03-07 11:41:02 +01:00
Marc Cornellà
9350e1ff87
fix(coffee): fix completion bug on missing coffee command ( #10759 )
...
This commit fixes the error
_coffee:49: bad math expression: operand expected at `< 2 '
when the coffee command is missing or the `coffee --version` command fails.
It also uses is-at-least to check for the cut-off version for suggesting
`--lint` and `--require` arguments, instead of using `cut` multiple times.
Fixes #10759
2022-03-07 11:13:18 +01:00
Marc Cornellà
46195d3aa7
fix: fix svn branch output in themes: apple, gentoo, kolo, zhann ( #10751 )
...
Fixes #10751
2022-03-03 17:53:03 +01:00
Marc Cornellà
04b1b75b9d
style: remove VCS_INFO svn settings from themes that don't enable it
2022-03-03 17:49:12 +01:00
Marc Cornellà
511ed65408
fix(aws): allow empty prefix and suffix in prompt function ( #10744 )
...
Fixes #10744
2022-02-28 10:03:02 +01:00
Marc Cornellà
c81804825c
fix(installer): fix removal of OMZ directory on failure
...
When the `git init` call fails, the directory is not created,
so the rm command fails with a not found error. This change
checks whether the directory exists before deleting it.
2022-02-25 14:06:19 +01:00
Marc Cornellà
28dc8c58ef
refactor(michelebologna): simplify and clean up code
2022-02-24 13:55:00 +01:00
Marc Cornellà
0b0af4df6a
fix(updater): fix check for latest commit in local repository
...
The previous check simply compared whether the last commit of the branch
was the same in the local and the remote repository.
This commit also checks whether the remote commit is an ancestor of the
local commit. This fixes the case where the local repository has new
commits after the last published commit.
2022-02-24 13:51:16 +01:00
Marc Cornellà
ff29836562
fix(updater): timeout after 2s on available update check
2022-02-24 13:51:16 +01:00
Marc Cornellà
914b6399e8
fix(installer): silence git init
2022-02-22 21:24:43 +01:00
Marc Cornellà
9b883aa417
fix(installer): set $HOME if not defined ( #10680 )
...
Fixes #10680
2022-02-22 21:24:43 +01:00
Marc Cornellà
6f1036293c
refactor(copydir)!: deprecate plugin in favor of copypath
...
BREAKING CHANGE: the `copydir` plugin is deprecated. Instead of
using `copydir`, use `copypath` which also supports copying
the path of other files or directories specified.
2022-02-22 11:25:31 +01:00
Marc Cornellà
11a23144ad
feat(copypath): add plugin to copy file paths to clipboard ( #7569 )
...
Closes #7569
Closes #10714
2022-02-22 11:25:09 +01:00
Marc Cornellà
b00b59364a
fix(vcs_info): don't patch VCS_INFO_formats if not found
2022-02-21 20:30:06 +01:00
Marc Cornellà
ebfd7cb219
ci: cancel current runs on new trigger
2022-02-21 19:27:21 +01:00
Marc Cornellà
07b829c894
fix(vcs_info): quote % in relevant fields on all current Zsh releases
2022-02-21 18:34:28 +01:00
Marc Cornellà
3427da4057
fix(dotenv): actually exit when .env syntax is broken
2022-02-18 19:41:21 +01:00
Marc Cornellà
ef3f7c43a9
fix: apply workaround patch for vcs_info (CVE-2021-45444)
...
This lib function applies a patch to the VCS_INFO_formats function
in zsh versions from v5.0.3 until v5.8, which don't quote % chars
in some arguments received. Normally that just means that some
% characters in these strings (branch names, directories, etc.)
will be incorrectly parsed as formatting sequences.
With CVE-2021-45444, however, this means that one of these strings
from a malicious source (e.g. a malicious git repository) can
trigger command injection and run arbitrary code in the user's
machine when visiting such git repository.
Zsh 5.8.1 fixes this vulnerability [1], but older vcs_info setups
still need a workaround such as this one to patch the vulnerability.
[1] https://github.com/zsh-users/zsh/commit/c3ea1e5d52eff8b7b172fa8c1ccc3462b43b2790
2022-02-13 19:07:12 +01:00
Marc Cornellà
69e2937891
fix(updater): fix input check on non-interactive runs
...
Reference: https://www.zsh.org/mla/users/2022/msg00067.html
2022-02-11 19:51:52 +01:00
Marc Cornellà and Philippe Troin
dbd92a62ce
fix(updater): do not swallow 1 character in check for user input
...
Co-authored-by: Philippe Troin <phil@fifi.org >
2022-02-11 10:04:51 +01:00
Marc Cornellà
7b708519b9
fix(emotty): show error on missing plugin dependencies ( #9811 )
2022-02-10 18:25:09 +01:00
Marc Cornellà
f0f42828fa
feat(updater): do not update when user already typed some characters ( #9699 )
...
Fixes #9699
2022-02-07 18:58:47 +01:00
Marc Cornellà
1e26ad1187
fix(bureau): fix top line space computation
...
Takes into account $ZLE_RPROMPT_INDENT and doesn't add the extra
space at the end so it doesn't bleed into the next line.
2022-02-07 17:57:59 +01:00
Marc Cornellà
74a3db75e4
perf(bureau): remove multiple grep calls in git status check
2022-02-07 17:55:16 +01:00
Marc Cornellà and GitHub
e1a9d0ce3e
fix(cli): allow omz commands to be used in a script ( #10645 )
...
The commands `omz plugin {enable,disable}` and `omz theme set`
automatically reload the zsh session on success. With this
change, the CLI checks whether the commands are run in an
interactive session before reloading the zsh session.
This change also conditionally sets the completion function
for `omz` so that it's not done in a non-interactive session.
2022-02-02 23:02:23 +01:00
Marc Cornellà
0be7c897f8
refactor(zsh_reload)!: remove deprecated plugin
...
BREAKING CHANGE: the `zsh_reload` was deprecated long ago and showed
a deprecation message. The `src` function was replaced by the CLI
command `omz reload`, so use that instead from now on.
2022-02-01 13:11:49 +01:00
Marc Cornellà
3fdad09d09
chore: update copyright year
2022-02-01 13:11:24 +01:00
Marc Cornellà
73001e9382
refactor(django): remove deprecated django plugin
...
BREAKING CHANGE: the `django` plugin was deprecated in 2021-09-22. With
this change it has now been removed altogether. Zsh already provides
built-in completion for Django commands.
2022-02-01 12:56:22 +01:00
Marc Cornellà
46f5d38b1d
refactor(installer): use POSIX-standard's id -u -n to define $USER
2022-01-28 20:53:30 +01:00
Marc Cornellà
3c5367d272
fix(changelog): don't show changelog with only ignored type commits
2022-01-28 13:36:54 +01:00
Marc Cornellà and GitHub
59c40eee8e
fix(installer): avoid git clone -c to support git v1.7.1 ( #10621 )
2022-01-27 18:01:27 +01:00
Marc Cornellà
3741d1aa02
fix(npx)!: detect new npx versions and fail gracefully ( #10452 )
...
BREAKING CHANGE: the `npx` plugin used a feature of `npx` to check for
npm packages and run them if a command was not found. This feature was
removed in v7.0.0 and was deemed insecure. The `npx` plugin is now
officially deprecated and will be removed soon.
Fixes #10452
2022-01-26 17:13:10 +01:00
Marc Cornellà
fc40b53e64
style(updater): silence git pull output and show errors in English
2022-01-24 18:32:36 +01:00
Marc Cornellà
f64cabc780
fix(cli): make sure to run zsh command if an alias exists ( #9737 )
...
Fixes #9737
2022-01-24 17:38:32 +01:00
Marc Cornellà
788802af68
fix(installer): correct check for sudo in shell change logic
2022-01-24 15:56:10 +01:00
Marc Cornellà
861805b64d
fix(installer): define $USER if not defined
...
Fixes missing $USER value in ArchLinux sh (bash)
2022-01-24 15:42:10 +01:00
Marc Cornellà
c7221c5f25
style(installer): prefix formatting variables with FMT_
2022-01-24 15:41:40 +01:00
Marc Cornellà
84931adcd4
fix: do not call chpwd hooks in subshells
2022-01-22 22:07:09 +01:00
Marc Cornellà
a7efd96a60
fix(dotenv): match for exact directory path in allowed/disallowed files
2022-01-19 19:27:53 +01:00
Marc Cornellà
0b08b70b0c
chore(poetry): fix copy-paste error
2022-01-19 17:15:16 +01:00
Marc Cornellà
22c11da108
fix(fig): fix typo in completion command
2022-01-18 21:26:45 +01:00
Marc Cornellà
957dca698c
style(sudo): clean code style and reorganise logic
2022-01-18 19:03:27 +01:00
Marc Cornellà
4f2d8b4d4c
fix(kubectl): source completion instead of autoloading it
2022-01-17 16:18:41 +01:00
Marc Cornellà
dfaad779a9
fix(helm): fix completion loading mechanism
2022-01-17 16:18:41 +01:00
Marc Cornellà
567bd59395
refactor(cli): use self-referencing in subcommand functions
2022-01-17 13:18:10 +01:00
Marc Cornellà
035c856c2c
fix: get branch name first in omz version and changelog
2022-01-13 17:46:09 +01:00
Marc Cornellà
805427e06b
fix(updater): give priority to zstyle settings if set ( #10587 )
...
Fixes #10587
2022-01-13 17:28:15 +01:00
Marc Cornellà and GitHub
aaebe4c890
fix(mvn): fix listing modules in completion ( #10586 )
2022-01-13 14:29:12 +01:00
Marc Cornellà
bddecfed58
style(updater): remove statl from git pull
2022-01-13 12:34:10 +01:00
Marc Cornellà
b481955761
ci(project): fix .list files not found error
2022-01-11 23:40:33 +01:00
Marc Cornellà
c63ba17525
refactor(installer): simplify user_can_sudo check
2022-01-11 19:53:50 +01:00
Marc Cornellà
a0a949de56
fix(installer): fix sudo check for users with password or without privileges
...
The previous check only worked if the user could run `sudo` without typing the
password, which is almost none (I checked in Google Cloud Shell so I failed to
notice this).
This new check works whether the user has no sudo privileges, or if it has,
whether they have to type in the password or not.
It should really be easier to check if the user doesn't have privilege without
having to make them type the password.
2022-01-11 19:13:23 +01:00
Marc Cornellà
b7a59e6d5c
fix(installer): run chsh with sudo if user has privileges
...
This fixes the error in Google Cloud Shell, where a password prompt
appears when running `chsh` but the user (hello) does not have a
password.
If ran with `sudo`, the `chsh` command happens without a password
prompt.
2022-01-11 16:45:36 +01:00
Marc Cornellà
9c84c344d7
fix: disable log.showSignature in git log calls
2022-01-10 19:39:05 +01:00
Marc Cornellà
0ca2e48ee8
ci(project): fix gh pr view call to use ohmyzsh repository
2022-01-10 17:22:31 +01:00
Marc Cornellà
fbdc078fa6
style: use 24bit colors in Oh My Zsh logo if supported
2022-01-09 23:11:35 +01:00
Marc Cornellà
a92ee838f3
fix(cli): follow symlinks in plugin or theme completions
2022-01-09 20:27:22 +01:00
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