aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-07-16 12:31:15 -0700
committerGravatar Tom Willemse2026-08-26 23:04:25 -0700
commit23feed3cc7685ff88c278fa3acbb18c68a4e3336 (patch)
tree43718a40b004297c0a4da7af3f064c6910960dc7 /zsh
parentf782e6f16bcd31061dc143bbb8df9d4edc4e5a4c (diff)
downloadnew-dotfiles-23feed3cc7685ff88c278fa3acbb18c68a4e3336.tar.gz
new-dotfiles-23feed3cc7685ff88c278fa3acbb18c68a4e3336.zip
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.
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshrc.org8
1 files changed, 8 insertions, 0 deletions
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.