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à and GitHub
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à and GitHub
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à and GitHub
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à and GitHub
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à and Carlo
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à and Carlo
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à and GitHub
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à and GitHub
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à 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