1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-10-14 15:49:09 +00:00

history: Move HISTFILE path to more conventional one

Change default `HISTFILE` path from `~/.zhistory` to more conventional
`~/.zsh_history`. This aligns better with Debian variants, macOS and
Oh My Zsh.

This would provide an easier onboarding experience to users coming to
Prezto from standard (framework free) zsh or from Oh My Zsh.

For existing Prezto users, we attempt to automatically rename old
`HISTFILE` to new one iff the old one exists and the new one doesn't.
However, if both old and new `HISTFILE` exist and the old one is more
recent, we just alert the user about what changed with a suggested way
to accommodate the change.
This commit is contained in:
Indrajit Raychaudhuri
2021-05-01 22:27:00 -05:00
committed by Indrajit Raychaudhuri
parent 1d1ae0a661
commit 509c5ca80f
2 changed files with 36 additions and 8 deletions

View File

@@ -3,10 +3,13 @@ History
Sets [history][1] options and defines history aliases.
**Note:** If you are migrating from [Oh My Zsh][2] and are not on a recent
version of macOS and want to keep your history, you will either need to set
`HISTFILE` manually to `$HOME/.zsh_history` or rename `~/.zsh_history` to
`~/.zhistory`.
**Note:** Default path of `HISTFILE` has changed from `${ZDOTDIR:-$HOME}/.zhistory`
to `${ZDOTDIR:-$HOME}/.zsh_history`. The file will be automatically renamed if
possible (when the new one doesn't exist). Otherwise, if you want to preserve
previous history, you will need to move them from `${ZDOTDIR:-$HOME}/.zhistory`
to `${ZDOTDIR:-$HOME}/.zsh_history`.
Alternately, you can set `HISTFILE` manually to `${ZDOTDIR:-$HOME}/.zhistory`.
Options
-------
@@ -40,11 +43,11 @@ Aliases
Authors
-------
*The authors of this module should be contacted via the [issue tracker][3].*
*The authors of this module should be contacted via the [issue tracker][2].*
- [Robby Russell](https://github.com/robbyrussell)
- [Sorin Ionescu](https://github.com/sorin-ionescu)
- [Indrajit Raychaudhuri](https://github.com/indrajitr)
[1]: http://zsh.sourceforge.net/Guide/zshguide02.html#l16
[2]: https://github.com/ohmyzsh/ohmyzsh
[3]: https://github.com/sorin-ionescu/prezto/issues
[2]: https://github.com/sorin-ionescu/prezto/issues