Как вы управляли маршрутизацией между этими 2 страницами.
Чтобы записать историю оболочки в файл истории, выполните
fc -W
fc
имеет несколько полезных флагов, их все можно найти в man zshbuiltins
.
Вы также можете полностью автоматизировать чтение и запись файла истории после каждой команды (таким образом, каждый запуск zsh), сказав setopt -o sharehistory
. Дополнительные параметры, связанные с историей, см. В man zshoptions
.
Я также только что нашел:
setopt INC_APPEND_HISTORY
От man zshoptions
:
INC_APPEND_HISTORY
This options works like APPEND_HISTORY except that new history
lines are added to the $HISTFILE incrementally (as soon as they
are entered), rather than waiting until the shell exits. The
file will still be periodically re-written to trim it when the
number of lines grows 20% beyond the value specified by $SAVE-
HIST (see also the HIST_SAVE_BY_COPY option).