Paul Frederiksen
d3888251ac
fix(check_for_upgrade): ensure compatibility with screen ( #13302 )
...
Co-authored-by: Paul Frederiksen <pfrederiksen@Pauls-Laptop.local>
9 months ago
Marc Cornellà
7d32e7fc3f
fix(updater): detect p10k instant prompt ( #12971 )
...
Fixes #12781
1 year ago
Marc Cornellà
80a651a6df
chore(updater): small typo
2 years ago
Marc Cornellà
56cfcb44e7
fix(updater): abort update if `$ZSH` is not a git repository
...
Fixes #12298
2 years ago
Marc Cornellà
29b99c2c7b
feat(updater): add `background-alpha` update mode (preview) ( #11928 )
...
NOTE: this feature is in alpha / preview mode, it is not guaranteed to work 100% of the
time in all cases. If you experience any issues, open an issue or search for an open
one describing your same situation.
To use this, use the zstyle update mode settings [1] with the value `background-alpha`:
zstyle ':omz:update' mode background-alpha
[1] https://github.com/ohmyzsh/ohmyzsh#getting-updates
3 years ago
Carlo Sala
d889eca726
fix(check_for_upgrade): update properly `LAST_EPOCH`
...
Fixes #11617
3 years ago
Håvard Bartnes
8f6fbe2389
feat(upgrade): add verbosity settings
...
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Closes #11574
Closes #11579
3 years ago
Carlo Sala
fe0dd8226d
fix(upgrade): do not upgrade if not called from tty
...
Fixes #11390
3 years ago
Carlo Sala
3fca9c8933
fix(upgrade): check if git is available and working
...
macOS seems to break dev tools when updating the system. This should
prevent the previous issues. See #11309
Closes #11420
3 years ago
Brian Wright
bb6c14cdfd
fix(updater): correct spelling of `curl` flag ( #11072 )
4 years ago
Marc Cornellà
18e7e5d033
fix(updater): use `curl --connect-timeout` in new update check
4 years ago
Marc Cornellà
846f417eb8
feat(updater): check for typed input before automatically updating ( #10830 )
4 years ago
SBado
af0c3b64b8
fix(updater): prefix `cd` with `builtin` when it is aliased ( #10753 )
4 years ago
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.
4 years ago
Marc Cornellà
ff29836562
fix(updater): timeout after 2s on available update check
4 years ago
Marc Cornellà
69e2937891
fix(updater): fix input check on non-interactive runs
...
Reference: https://www.zsh.org/mla/users/2022/msg00067.html
4 years ago
Marc Cornellà
dbd92a62ce
fix(updater): do not swallow 1 character in check for user input
...
Co-authored-by: Philippe Troin <phil@fifi.org>
4 years ago
Marc Cornellà
f0f42828fa
feat(updater): do not update when user already typed some characters ( #9699 )
...
Fixes #9699
4 years ago
Marc Cornellà
84931adcd4
fix: do not call chpwd hooks in subshells
4 years ago
Marc Cornellà
805427e06b
fix(updater): give priority to `zstyle` settings if set ( #10587 )
...
Fixes #10587
4 years ago
Nick Aldwin
c66fc00401
feat(updater): show command to update when update skipped ( #10465 )
5 years ago
Marc Cornellà
2b96b7c54b
fix(updater): stop update if `$ZSH` is not a git repository ( #10448 )
...
Fixes #10448
5 years ago
Marc Cornellà
e3f7b8aa57
fix(updater): avoid `git -C` for compatibility with git < v1.8.5 ( #10404 )
...
Fixes #10404
5 years ago
Marc Cornellà
db19589fcf
refactor(updater): simplify check for available updates
5 years ago
Marc Cornellà
7a2cb10625
fix(updater): stop update if connection unavailable
5 years ago
Marc Cornellà
30d441713c
feat(updater): check if there are updates before prompting ( #8387 )
...
Fixes #8387
5 years ago
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>
5 years ago
Marc Cornellà
3c9743313c
refactor(updater): change auto-update settings to use `zstyle`
5 years ago
Marc Cornellà
36f444ed73
fix(update): fix error exit code on update check ( #10033 )
...
This patch removes the 'exit 1' status code when the update check
finishes or is ended with CTRL+C.
Fixes #10033
5 years ago
Cai Cooper
6fbad5bf72
fix(update): don't error on upgrade no-op ( #9685 )
...
* Don't error on upgrade no-op
No error code is required for a non failure scenario.
* Manually check whether changes were pulled in `omz update`
Co-authored-by: Marc Cornellà <hello@mcornella.com>
5 years ago
Marc Cornellà
d978f385e5
fix(updater): refresh date of last update only on successful update
5 years ago
Marc Cornellà
5a888ff4ac
fix(updater): don't show changelog when running unattended update ( #9495 )
...
Fixes #9495
6 years ago
Marc Cornellà
889cd7acf3
refactor(updater): switch to Zsh execution and fix git remote detection logic
6 years ago
M. Yas. Davoodeh
5c1a5c6ce9
update: prefix rm call with command in trap ( #9107 )
...
* Suppress the problematic trap output in check_upg
The newly added trap, in systems where `rm` is aliased to `rm="rm -v"`,
shows a message stating that "update.lock" has been removed each time `zsh` is called.
I simply suppressed it with directing the output to `/dev/null`.
* Use `command` instead of >/dev/null to suppress
6 years ago
Marc Cornellà
97cf0bf4bd
update: change dash in function name for sh compat ( fixes #9064 )
6 years ago
alexagnelli
48b98b957e
update: only update on a valid affirmative input ( #9062 )
...
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
6 years ago
Marc Cornellà
3c777ebf1b
update: refactor and fix logic in check_for_upgrade.sh ( #8939 )
6 years ago
Marc Cornellà
c23ab00990
upgrade: fix lock-out on first upgrade check
...
This early return made it so the lock wasn't removed, therefore locking out
the upgrade script from ever entering the upgrade routine.
Fixes #6138
Note: the logic needs some rework.
7 years ago
Chao Du
de8299d6c4
Fixed Issue #4550 : Move ~/.zsh-update file to $ZSH_CACHE_DIR
8 years ago
Gert de Pagter
2b7a41b0d2
Update the update prompt ( #6825 )
...
`[Oh My Zsh] Would you like to check for updates? [Y/n]: ` does not make sense,
since answering yes will download/apply the new updates instead of checking for them.
8 years ago
Fabian Wolff
1f64fa92f5
Convert "if then" statements to "if; then" one-liners
10 years ago
Fabian Wolff
4fa6be0230
Use rmdir instead of rm -r
10 years ago
Fabian Wolff
40bfe5a412
Implement a locking mechanism to avoid multiple update prompts ( fixes #3766 )
10 years ago
Fredrik Fornwall
9772f8e10d
Replace /bin/sh with sh for portability ( #5291 )
...
This makes things work even on system lacking /bin/sh, such as on
non-rooted Android systems.
10 years ago
Arvind Chembarpu
e59e1c8417
Check for git before trying to upgrade, as per #4504
11 years ago
Marc Scholten
d351c76b04
Also accept any forms of yes as an answer to the "do you want to update?" prompt
11 years ago
HeroCC
6a1b8320fe
No input for Update Check defaults to Yes
11 years ago
Mark Feltner
83553597a1
fix(tools/check_for_upgrade): Don't source profile
...
Reverts #2296 , but mostly #1883 .
There is no need to source ~/.profile when this script is read. oh-my-zsh writes no configuration data in ~/.profile.
If the user wishes to use data within ~/.profile, then they should source it in another place.
Fixes #2315
12 years ago
Moinak Ghosh
3a39732845
Change to epoch target in days instead of seconds.
12 years ago
Moinak Ghosh
90762eee49
Convert epoch_target from days to seconds.
12 years ago