Server IP : 51.89.169.208 / Your IP : 216.73.216.211 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/usr/share/zsh/5.5.1/functions/ |
Upload File : |
#autoload # Complete history-style modifiers; the first : will have # been matched and compset -p 1'd. # The single argument is the type of context: # h history # q glob qualifier # p parameter local -a list local type=$1 delim expl integer global while true; do if [[ -n $PREFIX ]]; then local char=$PREFIX[1] global=0 compset -p 1 case $char in ([hretpqQxlu\&]) # single character modifiers ;; (s) # match delimiter string delimiter string delimiter if [[ -z $PREFIX ]]; then _delimiters modifier-s return fi delim=$PREFIX[1] compset -p 1 if ! compset -P "[^${delim}]#${delim}[^${delim}]#${delim}"; then if compset -P "[^${delim}]#${delim}"; then _message "replacement string" else _message "original string" fi return fi ;; (g) global=1 continue ;; esac # modifier completely matched, see what's next. compset -P : && continue # if there's something other than colon next, bummer [[ -n $PREFIX ]] && return 1 list=("\::modifier") [[ $type = q ]] && list+=("):end of qualifiers") # strictly we want a normal suffix if end of qualifiers _describe -t delimiters "delimiter" list -Q -S '' return else list=( "s:substitute string" "&:repeat substitution" ) if (( ! global )); then list+=( "a:absolute path, resolve '..' lexically" "A:as ':a', then resolve symlinks" "c:PATH search for command" "g:globally apply s or &" "h:head - strip trailing path element" "t:tail - strip directories" "r:root - strip suffix" "e:leave only extension" "Q:strip quotes" "P:realpath, resolve '..' physically" "l:lower case all words" "u:upper case all words" ) [[ $type = h ]] && list+=( "p:print without executing" "x:quote words, breaking on whitespace" ) [[ $type = [hp] ]] && list+=("q:quote to escape further substitutions") fi _describe -t modifiers "modifier" list -Q -S '' return fi done