jimhester / per-directory-history

Per directory history for zsh, as well as global history, and the ability to toggle between them with ^G.
zlib License
259 stars 36 forks source link

Fix per directory history not being activated #38

Closed sblask closed 4 years ago

sblask commented 4 years ago

Because of the guards in the switch functions and with HISTORY_START_WITH_GLOBAL being false by default, the per directory history was not active after initialisation.

During initialisation, _per_directory_history_is_global was false and _per-directory-history-set-directory-history was called but wouldn't do anything. Only toggling twice would enable per directory history.

This commit removes the guards and restructures the code slightly to make HISTORY_START_WITH_GLOBAL being false and true work from the beginning.

jimhester commented 4 years ago

Thanks!