Commit Graph
100 Commits
Author SHA1 Message Date
Marc CornellàandGitHub b75b01a309 chore: update README badges 2023-10-08 20:01:46 +02:00
Marc Cornellà cdd7dab5db ci(installer): remove vc link which generates the wrong project
`vc link` is not needed, as we already have `VERCEL_PROJECT_ID`
defined as an env variable. Currently the `vc link` only creates
a second empty project with the name `installer` as seen in logs:

  Linked to ohmyzsh/installer (created .vercel and added it to .gitignore)
  Vercel CLI 32.2.4
2023-09-17 16:20:46 +02:00
Marc Cornellà bbda81fe4b fix(changelog): fix regression for unstyled code in commit subjects 2023-09-13 19:23:41 +02:00
Marc CornellàandGitHub 30f0d59188 fix(init): exit gracefully if on non-zsh emulation mode (#11874)
Fixes #11686
2023-09-04 19:32:38 +02:00
Marc CornellàandGitHub 000be72dd0 fix(updater): disable nounset to avoid warnings (#11856) 2023-08-29 10:27:36 +02:00
Marc CornellàandGitHub 3f477e5da5 fix(extract): extraction to directory for single-file .gz (#11852) 2023-08-23 13:25:33 +02:00
Marc CornellàandGitHub cb8b677488 fix(termsupport): don't report current working directory in SSH sessions (#11703) 2023-06-11 17:02:48 +02:00
Marc Cornellà 50c678687e fix(termsupport): fix pwd report for Konsole (#11730)
The Konsole terminal shows an error if the host is provided in the
OSC 7 sequence.

Fixes #11730
2023-06-08 18:48:32 +02:00
Marc Cornellà b06663df23 feat(extract): add support for .zlib and .exe files (#11085)
Fixes #11085
2023-05-21 21:05:14 +02:00
Marc Cornellà 3a01d7df82 fix(extract): fix extract dir naming conflicts
Fixes #11642
2023-05-21 21:05:14 +02:00
Marc Cornellà 49d34d00cd fix(extract): fix conflict if compressed file has a folder of the same name
This change fixes the case where the compressed file (e.g. tools.tgz) only
contains a folder with the same name (e.g. tools) in its root folder.

tools.tgz:
|- tools
   |- fileA.txt
   |- fileB.txt
   \- fileC.txt

In that case, the "smart" folder creation mechanism will extract the files in
a folder "tools", and this extraction folder will contain a single folder with
the same name.

Before this fix, the tool would try to move out the inside folder to the parent
one, but there would already be a folder named "tools", so it would generate a
conflict.

This change first renames the inside folder to a random string, and only then
it is moved outside and the old extraction folder is deleted.
2023-04-06 21:06:16 +02:00
Marc Cornellà 9233ef75f2 fix(init): don't use digits in parameter modifiers for compatibility (#11598)
Digit modifiers were introduced in zsh 5.7.1 [1]. This commit uses readily available
alternatives for backwards compatibility.

[1] https://github.com/zsh-users/zsh/commit/b8dc5a7f6d

Fixes #11598
2023-04-03 23:36:44 +02:00
Marc Cornellà c7bb88f9ad fix(changelog): ignore lines containing whitespace in breaking change commits 2023-04-03 23:27:14 +02:00
Marc CornellàandGitHub 1ad167dfac feat(init)!: allow turning off aliases for libs and plugins (#11550)
BREAKING CHANGE: the previous zstyle setting to disable `lib/directories.zsh` aliases has
been changed to the new syntax: `zstyle ':omz:lib:directories' aliases no`. See
https://github.com/ohmyzsh/ohmyzsh#skip-aliases to see other ways you can use this setting.
    
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2023-04-03 23:14:36 +02:00
Marc Cornellà f8bf88edca chore(installer): remove words triggering false positives in antiviruses 2023-04-03 22:21:49 +02:00
Marc Cornellà d47e1d65f6 fix(extract): safely remove extract directory
The previous code would remove the extract directory if the command failed.
This could be bad because we're not checking if the extract directory
already existed (since we're using `mkdir -p`), so it could be possible
that the extract operation failed, and we'd be removing a directory that
already existed and had files in it.

This change only removes the directory if there are no files in it, regardless
of whether the extract operation was successful or not. This is much safer.
2023-04-02 16:33:54 +02:00
Marc CornellàandGitHub 75405b7b0a feat(extract): always extract files into its own folder (#11596) 2023-04-02 14:28:01 +02:00
Marc Cornellà f7d903f3a3 fix(vi-mode): fix cursor change on visual mode (#11586)
Fixes #11586
2023-04-02 13:40:49 +02:00
Marc Cornellà 6ef236dd99 fix(updater): search for upstream remote if using non-conventional name (#11135)
Fixes #11135
2023-04-01 10:15:59 +02:00
Marc CornellàandGitHub cc99132104 fix(vi-mode): fix check for prompt redisplay on mode change (#11547) 2023-03-31 07:51:10 +02:00
Marc Cornellà 72732a224e fix(lib): set equivalent LS_COLORS and LSCOLORS variables
As reported by https://geoff.greer.fm/lscolors

Fixes #11554
2023-03-12 15:47:58 +01:00
Marc Cornellà d342b353e3 fix(init): set completion colors on theme load, not with precmd
This fixes an edge case where the user actually sets

  zstyle ':completion:*' list-colors

in their zshrc, but the previous code used a precmd hook, which would
override the user changes. With this change our modifications will be
set in the init script, after the theme loads, so that later changes
can affect our defaults.

Note that this will not be run for users on plugin managers, as these
don't generally run our init script.
2023-03-07 18:54:06 +01:00
95d0c4b603 refactor(theme-and-appearance): reorganize and clean up logic (#11529)
Co-authored-by: Andrew Janke <janke@pobox.com>
Co-authored-by: Marcelo Parada <marcelo.parada@axoninsight.com>
Co-authored-by: Uy Ha <hchanuy@gmail.com>
Co-authored-by: Valentin Uveges <valentin.uveges@gmail.com>
2023-03-03 14:38:50 +01:00
Marc CornellàandGitHub 5bf7f9c833 fix(lib): use $BROWSER in open_command if set (#11532)
Fixes #11098
2023-03-03 12:34:31 +01:00
Marc Cornellà b602e0a066 fix(aliases): fix regression in filter argument 2023-02-27 20:46:42 +01:00
Marc CornellàandGitHub cd647b6dc6 fix(gnu-utils): reset ls alias to use GNU-based --color argument (#11527)
Fixes #11503
2023-02-26 15:44:18 +01:00
Marc Cornellà 277f38212a refactor: reorganize setopts in lib folder 2023-02-24 20:55:31 +01:00
Marc Cornellà 5cb943eea4 fix(lib): fix return code after expected non-zero exit code (#11524)
Fixes #11524
2023-02-24 17:27:23 +01:00
Marc Cornellà 6c3cf658f6 fix(installer): automatically create ZDOTDIR path if it doesn't exist 2023-02-02 08:53:44 +01:00
Marc Cornellà 5c9a3d2f4f fix(installer): don't use $ZDOTDIR in zshrc file if same as $HOME
Fixes #11471
2023-02-02 08:53:44 +01:00
Marc CornellàandGitHub b0bffcaf86 fix(fzf): fix check for true Debian-like in debian setup function (#11460)
Check for `apt` and `apt-get` in debian setup function.
Look for exact directory in debian-like setup function.

Fixes #11459
2023-01-27 16:22:27 +01:00
Marc CornellàandGitHub e55e3f0f56 fix(systemadmin): handle error for no IPv6 route in geteip (#11458) 2023-01-26 20:45:48 +01:00
Marc Cornellà 17ea97332b Revert "fix(lib): send carriage return after title to fix #11314 (#11315)"
This reverts commit 3dd83a22a1.

See https://github.com/ohmyzsh/ohmyzsh/issues/11314#issuecomment-1379492472
2023-01-12 08:29:00 +01:00
Marc CornellàandCarlo a04cf07880 refactor(bgnotify): clean up and reorganize code
🗸 Standardize code style
🗸 Organize code sections
🗸 Optimize calls for window ID
2022-11-11 09:53:21 +01:00
Marc CornellàandCarlo 5b2d0a3f06 perf(bgnotify): cache terminal app ID computation
Fixes #10971
2022-11-11 09:53:21 +01:00
Marc Cornellà 1342459b15 ci: fix update of plugin or theme fields
See [1] for the reference of value field (ProjectV2FieldValue type),
and [2] for sample application code.

[1] https://docs.github.com/en/graphql/reference/input-objects#projectv2fieldvalue
[2] https://docs.github.com/en/enterprise-cloud@latest/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions#example-workflow-authenticating-with-a-github-app
2022-11-04 19:16:54 +01:00
Marc Cornellà 65a1e4edbe fix(installer): detect newer Git for Windows version errors (#11157)
Fixes #11157
2022-10-14 20:31:33 +02:00
Marc Cornellà b9be3a43b4 fix(cli): change unrecognized \s in BSD awk (#11146)
In BSD awk, \s is not a valid sequence interchangeable with "space or tab characters"
as it is in GNU awk. This fix uses [ \t] instead, which is all the possibilities that
we need to contemplate when reading the .zshrc file.

Fixes #11146
2022-10-12 11:06:29 +02:00
Marc Cornellà ee4910e3b3 fix: show full hyperlinks in Konsole (#10964)
Fixes #10964
2022-10-12 10:55:02 +02:00
Marc Cornellà f80cf12092 fix: fix OSC 8 hyperlink escape sequences 2022-10-12 10:49:44 +02:00
Marc Cornellà b93b67b844 fix(gradle): remove deprecated use of egrep (#11160) 2022-10-03 17:11:52 +02:00
Marc Cornellà 1c879f67b4 fix(ssh-agent): silence ssh-add if quiet mode is enabled (#11201)
Fixes #11201
2022-10-03 16:58:42 +02:00
Marc Cornellà 23f3ded92d chore(react-native): fix README table alignment 2022-10-03 16:24:15 +02:00
Marc CornellàandGitHub 0346cdf7f6 docs: document new aliases policy (#11045) 2022-08-02 19:27:54 +02:00
Marc Cornellà 4fcf52c2b1 fix: don't use $functions_source for compatibility with zsh < 5.4 2022-08-01 20:54:45 +02:00
Marc Cornellà ef8e63a7fd fix(lib): prefer xsel over xclip in clipboard.zsh
See #10925
2022-07-12 18:56:09 +02:00
Marc Cornellà 39573125e4 feat(lib): wait for input to copy to the clipboard (#10953) 2022-07-12 18:52:22 +02:00
Marc Cornellà 4506210c38 fix(lib): don't attach to tty in wl-copy and xclip (#10953)
Fixes #10925
2022-07-12 18:52:21 +02:00
Marc Cornellà 8168ec0174 refactor!: remove deprecated plugins
BREAKING CHANGE: the following deprecated plugins have been removed:
`cargo`, `copydir`, `npx`, `osx`, and `rustup`. See the wiki for more info:
https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins#removed

refactor(rustup)!: remove deprecated plugin

BREAKING CHANGE: the plugin was deprecated and is now removed. See the wiki for more info:
https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins#removed
2022-06-15 20:14:02 +02:00
Marc Cornellà 18e7e5d033 fix(updater): use curl --connect-timeout in new update check 2022-06-01 09:11:49 +02:00
Marc Cornellà 39b600e9e5 fix(lib): encode all arguments besides the first in omz_urlencode
Fixes https://github.com/ohmyzsh/ohmyzsh/commit/140c977a3d82410f48c198596de193d2d6b7b9b5#commitcomment-73688165
2022-05-15 13:20:33 +02:00
Marc CornellàandGitHub dfee71c773 Revert "fix(lib): don't return clean with hide-dirty=1 in parse_git_dirty" (#10927) 2022-05-12 18:25:02 +02:00
Marc Cornellà 8f56a8bdf3 refactor(boot2docker)!: remove plugin for abandoned boot2docker (#10877)
BREAKING CHANGE: the boot2docker project was abandoned in 2020,
so it makes no sense to keep the plugin. If you were using it,
remove it from the `$plugins` array.

Fixes #10877
2022-04-24 19:09:08 +02:00
Marc Cornellà 8741664e55 fix(nvm): don't try to load nvm via brew if not found (#10878)
Fixes #10878
2022-04-24 18:59:44 +02:00
Marc Cornellà 30e23a643b refactor(cli): fix commit.gpgsign test in omz pr test 2022-04-14 12:14:40 +02:00
Marc Cornellà f1a5fb5ee9 fix(cli): fix commit.gpgsign test in omz pr test
Since `set -e` is enabled, when `commit.gpgsign` is not set the
`git config` command would show an error. Given that it is technically
not ignored, the subshell would exit.

With this change, the `commit.gpgsign` setting is properly tested
by doing the fallback test if the command fails, so no exit status
code ends up quiting the subshell.
2022-04-14 12:08:59 +02:00
Marc Cornellà ac82e156ca style(systemadmin): use function to avoid alias conflicts 2022-04-13 13:14:38 +02:00
Marc CornellàandGitHub 846f417eb8 feat(updater): check for typed input before automatically updating (#10830) 2022-04-10 10:20:51 +02:00
Marc CornellàandGitHub 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àandinclusive-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àandGitHub 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àandPhilippe 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àandGitHub 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àandGitHub 59c40eee8e fix(installer): avoid git clone -c to support git v1.7.1 (#10621) 2022-01-27 18:01:27 +01:00