Not working on cygwin
Closed this issue · 1 comments
mijoharas commented
I've started needing to use a cygwin environment for work so have tried copying my settings (including opp.zsh) over.
When trying to perform ciw
I get:
opp-generic-w:5: command not found: opp-skip-alnum-backward
opp-generic-w:6: command not found: opp-skip-alnum-forward
hchbaw commented
Hi, @mijoharas . Thank you very much for your report.
opp-skip-alnum-backward
and opp-skip-alnum-forward
are defined by using cat
command.
Does below snippet work on cygwin environment?
# copied from opp.zsh.
def-opp-skip () {
eval "$(cat <<EOT
$1 () { while [[ \${BUFFER[((CURSOR$3))]-} == $4 ]] do ((CURSOR$2)) done }
zle -N $1
EOT
)"
}
def-opp-skip opp-skip-alnum-backward -- -0 "[[:alnum:]_]"
echo $functions[opp-skip-alnum-backward]
This should output below:
while [[ ${BUFFER[((CURSOR-0))]-} = [[:alnum:]_] ]]
do
((CURSOR--))
done