HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //usr/share/zsh/4.3.11/functions/cycle-completion-positions
# This may be called after a completion that inserted the unambiguous
# (i.e. non-menu- and non-single-match-) string into the command line.
# If there are multiple positions in the string with missing or differing
# characters, repeatedly calling this widget cycles between all these
# positions.

emulate -L zsh
setopt extendedglob

local p="$_lastcomp[insert_positions]"

if [[ $p = ((#s)|*:)${CURSOR}:* ]]; then
  CURSOR=${${p#(|*:)${CURSOR}:}%%:*}
elif [[ -n $p ]]; then
  CURSOR=${p%%:*}
fi