From bead27b2d8692df41d1eccd8b77471babfd9d245 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 23 Mar 2026 09:30:14 -0400 Subject: [PATCH] add history fixup and support default and per-user nix profile --- dot_config/zsh/dot_zshrc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index f103f65..e600916 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -67,6 +67,12 @@ if [[ -n "$WSL_DISTRO_NAME" ]]; then alias usbipd='usbipd.exe' fi +fix_corrupt_history() { + mv "$HISTFILE" "$HISTFILE"_bad + strings "$HISTFILE"_bad > "$HISTFILE" + fc -R "$HISTFILE" +} + # GPG setup (and SSH) # SSH setup # I finally figured out how to export my id_rsa from GPG using @@ -119,8 +125,10 @@ for plugin in zsh-syntax-highlighting zsh-history-substring-search zsh-autosugge possible_locations=( # Standard location "/usr/share/zsh/plugins/$plugin/$plugin.zsh" - # Nix + # Nix default profile "/nix/var/nix/profiles/default/share/$plugin/$plugin.zsh" + # Nix per-user profile + "$HOME/.nix-profile/share/$plugin/$plugin.zsh" # Direct in /usr/share "/usr/share/$plugin/$plugin.zsh" # Home directory locations