1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00
Commit graph

708 commits

Author SHA1 Message Date
Marc Cornellà
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
Carlo Sala
902b79e635
fix(functions): use command env
Closes #11709
2023-05-23 08:43:49 +02:00
Carlo Sala
dcff7a7f08
fix(theme-and-appearance): make bsd ls to be default 2023-05-09 12:05:15 +02:00
Carlo Sala
c5208867f1 feat(theme-and-appearance): allow disabling gnu-ls in bsd
To disable gnu-ls (`gls`) even if it's installed in freeBSD and macOS
you can set it up with:
```zsh
zstyle ':omz:lib:theme-and-appearance' gnu-ls no
```

Closes #11647
2023-05-06 13:39:01 +02:00
Erin Schlarb
5b11e70a96
fix(cli): execute as expected if ksh_arrays is set (#11629) 2023-04-20 13:32:32 +02:00
Alexander Schlarb
25c2c3a468
feat(lib): send OSC 7 on directory change for more supported terminals (#9914)
Previously this was only emitted on macOS with Apple's Terminal.app (and
compatible clones like iTerm2), but it is used by other terminal emulators
as well to obtain the actual current working directory wiht symlinks intact.
All non-supporting terminal emulators tested gracefully ignored this value,
so emit this on these as well in case they (or some other app masquarading
as them) add future support for this value.

Closes #9914

Co-authored-by: Marc Cornellà <hello@mcornella.com>
2023-04-05 00:20:10 +02:00
Christian Parpart
8d23fbd696
feat(termsupport): add contour terminal (#11599)
Signed-off-by: Christian Parpart <christian@parpart.family>
2023-04-04 16:47:13 +02:00
Marc Cornellà
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
Håvard Bartnes
8f6fbe2389
feat(upgrade): add verbosity settings
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>

Closes #11574
Closes #11579
2023-03-28 12:58:33 +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
Marc Cornellà
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à
5bf7f9c833
fix(lib): use $BROWSER in open_command if set (#11532)
Fixes #11098
2023-03-03 12:34:31 +01:00
Jannik
0ca8907f0e
fix(lib): fix case-insensitive completion for zsh 5.9 (#11526) 2023-02-26 20:37:03 +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
Carlo Sala
aca048814b
fix(theme-and-appearance): avoid infinite recursion 2023-02-22 15:35:12 +01:00
Carlo Sala
8a68bf6772
fix(theme-and-appearance): test color ls with $ZSH directory
Fixes #11500
2023-02-16 12:54:23 +01:00
Richard Mitchell
574669da6b fix(correction)!: remove aliases for non standard commands
BREAKING CHANGE: This commit removes aliases for some commands that
previously were not being autocorrected. If you are using
autocorrection, please check it.
2023-02-15 09:23:04 +01:00
Richard Mitchell
416560c9bf
docs(lib/directories): comment how to disable alias (#11489) 2023-02-12 17:46:25 +01:00
Julien Rottenberg
379fe0fe13
feat(azure): add azure plugin (#8848)
Co-authored-by: hagridaaron <hagridaaron@gmail.com>
Co-authored-by: Terry <tmoschou@gmail.com>

Closes #8847
2023-02-07 12:33:59 +01:00
Hazael Sanchez
ea4854dba3
feat(directories): add config to skip aliases (#11469)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2023-02-02 11:30:34 +01:00
Carlo Sala
657ad0523d fix(theme-and-appearance): fix diff completion in macOS
Closes #11416
Closes #11454
2023-01-25 18:12:20 +01:00
Joan Marcè i Igual
bf57b4ff3d
feat(functions/take): make .tgz behave as .tar.gz (#11446) 2023-01-20 19:45:14 +01:00
Carlo Sala
df658350a3
fix(clipboard): move wsl detection to higher priority (#11440)
Closes #8827
2023-01-15 17:11:29 +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
Lawton Nichols
3dd83a22a1
fix(lib): send carriage return after title to fix #11314 (#11315)
Window and tab titles are changed by emitting an unprintable escape
sequence to the terminal. These escape sequences do not play nicely
with the TAB character on multiple terminal emulators--they create
un-deletable characters on the first line after command execution.
Sending "\r" after changing the window and tab titles allows all
characters on the first line to be deleted.

Fixes #11314
2023-01-11 19:44:29 +01:00
Banst
6dfc9b960f
feat(git): display tag in git-prompt when possible (#11318)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
2022-11-08 09:34:13 +01:00
Carlo
8487a5536d
fix(cli): avoid using column (#11271) 2022-10-18 19:38:47 +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
Nadhem
570158e464
chore(lib): update deprecated grep aliases (#11161) 2022-10-03 17:59:49 +02:00
Ben Walton
97134d1eed
fix(cli): make omz honour symlinks when changing .zshrc (#11082) 2022-08-02 19:28:44 +02:00
hellzbellz
0c7ce363c9
chore(lib): only create afind alias if ack is installed (#11017) 2022-07-12 19:36:43 +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à
39b600e9e5
fix(lib): encode all arguments besides the first in omz_urlencode
Fixes 140c977a3d (commitcomment-73688165)
2022-05-15 13:20:33 +02:00
Marc Cornellà
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
Will LE
4674384d1a
fix(lib): don't return clean with hide-dirty=1 in parse_git_dirty (#10897) 2022-05-12 11:31:00 +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
Carlo Sala
141d06b602
fix(cli): turn of commit.gpgsign compatibly with git v1.7.1 (#10679)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
2022-03-31 09:27:58 +02:00
Markus (Vock) Arians
99460351eb
feat(lib): support auto title in foot terminal (#10735)
Co-authored-by: Markus Arians <markus.arians@andrena.de>
2022-02-25 13:29:22 +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à
07b829c894
fix(vcs_info): quote % in relevant fields on all current Zsh releases 2022-02-21 18:34:28 +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] c3ea1e5d52
2022-02-13 19:07:12 +01:00
Carlo Sala
0da33ca22b
fix(cli): disable GPG signing in omz pr test to avoid key prompt (#10677) 2022-02-10 11:50:04 +01:00
Marc Cornellà
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à
f64cabc780
fix(cli): make sure to run zsh command if an alias exists (#9737)
Fixes #9737
2022-01-24 17:38:32 +01:00