Skip to content

Commit d374e4a

Browse files
committed
fix(atuin): regenerate cached init when shell script is updated
The cached init.zsh now also regenerates when atuin.zsh itself is newer (e.g. after yadm pull), not just when the binary is upgraded.
1 parent f06a73c commit d374e4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.shellrc/zshrc.d/configs/post/atuin.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ fi
1515
# Regenerates when the atuin binary is newer (i.e. after upgrades).
1616
_atuin_init="${XDG_DATA_HOME:-$HOME/.local/share}/atuin/init.zsh"
1717

18-
if [[ ! -f "$_atuin_init" || "$_atuin_init" -ot "$(command -v atuin)" ]]; then
18+
# Regenerate when: missing, binary was upgraded, or this script was updated (e.g. yadm pull).
19+
if [[ ! -f "$_atuin_init" || "$_atuin_init" -ot "$(command -v atuin)" || "$_atuin_init" -ot "${(%):-%x}" ]]; then
1920
mkdir -p "${_atuin_init:h}"
2021
# --disable-up-arrow so we can bind up-arrow to native prefix search below,
2122
# while Ctrl-R still opens the Atuin TUI.

0 commit comments

Comments
 (0)