Server IP : 51.89.169.208 / Your IP : 216.73.216.94 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) 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 : ON Directory : /proc/thread-self/root/proc/thread-self/root/usr/share/zsh/5.5.1/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 between 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]} # If, furthermore, we're on whitespace, then we're between words. # It can't be significant whitespace because the previous word is complete. [[ $RBUFFER[1] = [[:space:]] ]] && between=1 else # We're on a word. forword=${bufwords[iword]} fi backword=${bufwords[iword]} if [[ between -ne 0 && $curcontext = *between* ]]; then word=' ' elif [[ $curcontext = *back* ]]; then word=$backword else word=$forword fi for pat tag in "${worcon[@]}"; do if [[ $word = ${~pat} ]]; then curcontext+=":$tag" return fi done