Logic error in `history -c` when prompting for confirmation caused history
to be deleted when typing anything but explicitly `n`, `N`, or sending `\n`.
New logic prevents deletion by pressing wrong key and only deletes
history when sending `y` or `Y`.
Co-authored-by: Sargates <nicholas.g.glenn@gmail.com>
We removed this mitigation in 0c80a063 because of an assumption
that the issue had been fixed, but it looks like zsh < 5.0.6 has
other issues (see #12360), so we need to disable it for real.
Fixes#12360
The `t` option takes a strftime format specification as argument. This
fixes cases in which $HIST_STAMPS is set to a value other than
`mm/dd/yyyy|dd.mm.yyyy|yyyy-mm-dd`.
* Fixed a bug in *omz_history* where it would automatically create a file when run with the -p flag
* Reverted old history behaviour while fixing parsing bug
BREAKING CHANGE: we have fixed a bug in the `history` wrapper for OMZ which means
that running just history will now not show all the history since the 1st command,
but only recent ones. To get the previous behavior, you can run `history 1` to get
all the command history, or other commands such as `history -30` to get the last
30 commands.
This is important for themes using it, since it is usually a little slower than git_prompt_info.
Also two small fixes :
- the handler for git_prompt_info was incorrectly named _omz_git_prompt_status
- _defer_async_git_register was kept in precmd, there is no need to call it on each prompt
BREAKING CHANGE: the new async prompt feature will render prompt information
asyncronously and degrade nicely when the calls take too long to finish, as
the prompt will already be first drawn and interactive. This is
enabled by default for the git prompt and themes that use it (`git_prompt_info`).
If you find that it's not working for you, please open an issue if one is
not already opened, and see https://github.com/ohmyzsh/ohmyzsh#disable-async-git-prompt
for how to turn it off.
This fix conditionally registers the git prompt async handler only
if `git_prompt_info` is used anywhere in the prompt variables.
This is done in the proper order, so that the async request is
processed once the handler has been registered.
This fix also passes the return value of the previous command
to each of the async handlers, in case they are needed.
BREAKING CHANGE: the `git_prompt_info` prompt function has been
reworked by default to use the new async prompt feature. If you're
experiencing issues see #12257.
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
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