| Server IP : 199.250.200.62 / Your IP : 216.73.217.89 Web Server : Apache System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : jasonp18 ( 1000) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/share/zsh/5.0.2/functions/ |
Upload File : |
# See if we can extend the word context to something more specific.
# curcontext must be set to the base context by this point; it
# will be appended to directly.
emulate -L zsh
setopt extendedglob
local -a worcon bufwords
local pat tag lastword word backword forword
integer iword
zstyle -a $curcontext word-context worcon || return 0
if (( ${#worcon} % 2 )); then
zle -M "Bad word-context style in context $curcontext"
return
fi
bufwords=(${(z)LBUFFER})
iword=${#bufwords}
lastword=${bufwords[-1]}
bufwords=(${(z)BUFFER})
if [[ $lastword = ${bufwords[iword]} ]]; then
# If the word immediately left of the cursor is complete,
# we're not on it for forward operations.
forword=${bufwords[iword+1]}
else
# We're on a word.
forword=${bufwords[iword]}
fi
backword=${bufwords[iword]}
if [[ $curcontext = *back* ]]; then
word=$backword
else
word=$forword
fi
for pat tag in "${worcon[@]}"; do
if [[ $word = ${~pat} ]]; then
curcontext+=":$tag"
return
fi
done