Deduplicating zsh Command History Automatically Once a Day

Automatically Deduplicating zsh Command History in zshrc

With daily terminal work, the same commands pile up in ~/.zsh_history over and over. History searches with peco / Ctrl-R end up full of noise, and the file tends to grow. The zshrc I use every day is part of a dotfiles repository where I keep all my dot files together under Git. This time I decided to touch that zshrc and add settings that cut down the duplicates. Deciding the requirements first Before doing any work, I settled on the following specification. [Read More]

Four .zshrc Mistakes That Quietly Break Zsh, and How to Fix Them

What came out of reviewing my .zshrc: return $(...), LC_ALL, compinit order and heavy ls aliases

I had been happily using the zshrc I set up in Reviewing my Zsh and NeoVim configuration as a base, but I went over the configuration again with the help of generative AI (ChatGPT-5.2). What I improved Made the broken predicate functions correct (stopped using return $(…)) Left the locale alone (LC_ALL in particular is easy to get wrong) Made completion work from the very first shell (avoided the landmine of zinit lazy loading combined with the compinit order) Isolated the heavy listings into ll/la so that everyday ls does not get slow Background: with .zshrc, convenience and destruction are a hair apart When it comes to improving a zshrc, there are more landmines of the “writing it the wrong way quietly breaks things” kind than there is work on appearance or adding aliases. These were the four places I got stuck this time: [Read More]