From 66b00dd42c4e67e0b879b0bec41b0b019e921835 Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Mon, 12 Jan 2026 23:33:47 +0530 Subject: [PATCH] feat(zsh): Improvements: Enable zmv batch-renamer, enable undo while typing commands --- common/.zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/.zshrc b/common/.zshrc index 1860435..f3aa064 100644 --- a/common/.zshrc +++ b/common/.zshrc @@ -58,6 +58,9 @@ VI_MODE_CURSOR_INSERT=3 TIMER_PRECISION=3; TIMER_FORMAT='[%d]' HISTORY_BASE="$ZSH_STATE_HOME/per-directory-history" +# Enable zmv (zsh batch-renamer) +autoload zmv + # Zinit Plugins zinit ice depth=1; zinit light romkatv/powerlevel10k zinit ice depth=1; zinit light jimhester/per-directory-history @@ -126,6 +129,11 @@ for alias_file in "$XDG_CONFIG_HOME"/shell/*.sh; do source "$alias_file"; done # Keybindings bindkey '^f' autosuggest-accept +bindkey '^u' undo +# TIP:: zinit auto expands following when you `space`/`tab` after them +# !* -> all arguments to previous command +# !?search-term? -> Last command that contained `search-term` +# !! -> Entire last command # TIP: Following should be executed AFTER aliases are sourced command -v op >/dev/null && bindkey -s '^o' ' op\n' # Fuzzyfind projects and open in nvim