diff options
| author | 2026-07-16 12:31:15 -0700 | |
|---|---|---|
| committer | 2026-07-16 12:37:23 -0700 | |
| commit | 1860b49070359718fa7a3136571e7e935f38ed9c (patch) | |
| tree | da13ef6bb110b300106e392e3c81ad3274035fe1 | |
| parent | 13ee2ec2babdbe9de715227d11ca78d6aa1795e2 (diff) | |
| download | new-dotfiles-1860b49070359718fa7a3136571e7e935f38ed9c.tar.gz new-dotfiles-1860b49070359718fa7a3136571e7e935f38ed9c.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.
| -rw-r--r-- | zsh/zshrc.org | 8 |
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. |
