From 23feed3cc7685ff88c278fa3acbb18c68a4e3336 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 16 Jul 2026 12:31:15 -0700 Subject: zsh: Remove ‘/’, ‘-’, and ‘)’ from wordchars The ‘WORDCHARS’ variable defines which characters that aren't letters are to be part of a word. I'm removing these so commands like delete-word won't gobble up these characters as well. This is bringing the function closer to what I expect from Emacs. --- zsh/zshrc.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'zsh') diff --git a/zsh/zshrc.org b/zsh/zshrc.org index 5d54e59..e57431a 100644 --- a/zsh/zshrc.org +++ b/zsh/zshrc.org @@ -8,6 +8,14 @@ Autoload any ZSH function from =$HOME/.zsh/functions=. autoload -U $HOME/.zsh/functions/*(:t) #+END_SRC +Remove =/= from ZSH's characters considered to be part of a word. This means that something like =M-DEL= will stop at =/= characters. + +#+begin_src sh + WORDCHARS=${WORDCHARS/\/} + WORDCHARS=${WORDCHARS/-} + WORDCHARS=${WORDCHARS/)} +#+end_src + * Aliases Use rlwrap on some less-than-pleasant REPLs that don't have GNU Readline-like features themselves. -- cgit v1.3-2-g0d8e