first commit

This commit is contained in:
Arctic 2025-07-04 11:48:40 -05:00
commit 0610f4aeab
130 changed files with 9897 additions and 0 deletions

19
fn/z4h-backward-word Normal file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env zsh
emulate -L zsh -o extended_glob
local buf w=${WORDCHARS//[[:space:][:alnum:]]}
repeat ${NUMERIC:-1}; do
buf=${LBUFFER%%[[:space:]]#}
if (( $#buf < 2 )); then
buf=
elif [[ $buf == *[[:space:]]? ]]; then
buf[-1]=
elif [[ $buf[-2,-1] != *[[:alnum:]$w]* ]]; then
buf=${buf%%[^[:space:][:alnum:]$w]#}
else
[[ $buf == *[[:alnum:]$w] ]] || buf[-1]=
buf=${buf%%[[:alnum:]$w]#}
fi
(( CURSOR -= $#LBUFFER - $#buf ))
done
return 0