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

278 commits

Author SHA1 Message Date
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
SBado
af0c3b64b8
fix(updater): prefix cd with builtin when it is aliased (#10753) 2022-03-04 16:54:51 +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à
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à
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à
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à
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à
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à
59c40eee8e
fix(installer): avoid git clone -c to support git v1.7.1 (#10621) 2022-01-27 18:01:27 +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à
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à
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à
bddecfed58
style(updater): remove statl from git pull 2022-01-13 12:34:10 +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à
fbdc078fa6
style: use 24bit colors in Oh My Zsh logo if supported 2022-01-09 23:11:35 +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
Nick Aldwin
c66fc00401
feat(updater): show command to update when update skipped (#10465) 2021-12-01 12:44:15 +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à
fb12e41353
fix(install): fix backslash in printf when showing logo (#10422)
Fixes #10422
2021-11-16 19:24:32 +01:00
Marc Cornellà
e3f7b8aa57
fix(updater): avoid git -C for compatibility with git < v1.8.5 (#10404)
Fixes #10404
2021-11-10 11:21:59 +01:00
Marc Cornellà
db19589fcf
refactor(updater): simplify check for available updates 2021-11-09 19:56:53 +01:00
Kevin Burke
e86c6f5e7f
style: use -n flag in head and tail commands (#10391)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
2021-11-09 09:04:10 +01:00
Marc Cornellà
7a2cb10625
fix(updater): stop update if connection unavailable 2021-11-05 19:47:29 +01:00
Marc Cornellà
1dba112041
fix(changelog): fix for ${(@ps:$sep:)var} construct in zsh < 5.0.8
In recent zsh versions, `${(@ps:$sep:)var}` where $sep is a variable containing
a separator string and $var is a string with multiple values separated by $sep,
the `p` flag makes zsh correctly expand $sep before splitting $var. In versions
older than 5.0.8, this doesn't happen, so we use `eval` to get the same effect.
2021-10-27 10:12:23 +02:00
Marc Cornellà
4b3a5c5411
fix(changelog): fix percent escapes in printf calls 2021-10-26 21:04:02 +02:00
Marc Cornellà
0267cb89eb
perf(changelog): use regex-match instead of sed to parse commit subjects 2021-10-26 21:04:01 +02:00
Marc Cornellà
140bfa8432
fix(changelog): go back to ignoring commits from merged branches 2021-10-26 21:04:01 +02:00
Marc Cornellà
9c8131e417
perf(changelog): use a single git log command to get all commit messages 2021-10-26 21:04:00 +02:00
Marc Cornellà
c2b9ae2937
fix(changelog): don't show more than 40 commits (#10345)
Fixes #10345
2021-10-26 13:23:07 +02:00
Marc Cornellà
19f9b6f1ad
feat(updater): add support for terminal hyperlinks 2021-10-13 11:58:56 +02:00
Marc Cornellà
607d2f1eda
Revert "fix(changelog): don't parse commits of ignored types"
This reverts commit 63b7e5767d.
2021-10-07 13:35:07 +02:00
Marc Cornellà
63b7e5767d
fix(changelog): don't parse commits of ignored types 2021-10-05 16:56:00 +02:00
Marc Cornellà
30d441713c
feat(updater): check if there are updates before prompting (#8387)
Fixes #8387
2021-10-04 10:47:10 +02:00
Marc Cornellà
0120749a54
feat(updater): add mode to only remind you to update when it's time (#10187)
Fixes #10187

Co-authored-by: NoPreserveRoot <NoPreserveRoot@pm.me>
2021-10-04 10:47:10 +02:00
Marc Cornellà
3c9743313c
refactor(updater): change auto-update settings to use zstyle 2021-10-04 10:47:10 +02:00
Marc Cornellà
57e8c959a0
style(installer): use rainbow logo and polish success message (#10211) 2021-09-23 18:28:34 +02:00
Marc Cornellà
098bcda691
feat(update): allow updating from branch set up on install
Closes #8788

Co-authored-by: Nikolas Garofil <nikolas@garofil.be>
2021-09-22 09:27:43 +02:00
Marc Cornellà
b79726b1c3
fix(update): silence typeset calls in upgrade.sh script (#10048)
Co-authored-by: yyny <6576327+yyny@users.noreply.github.com>
2021-09-16 17:01:58 +02:00