Server IP : 103.119.228.120 / Your IP : 3.139.98.10 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/ssl/share/zsh/5.0.2/functions/ |
Upload File : |
#autoload # This completer function is intended to be used as the first completer # function and allows one to say more explicitly when and how the word # from the line should be expanded than expand-or-complete. # This function will allow other completer functions to be called if # the expansions done produce no result or do not change the original # word from the line. setopt localoptions nonomatch [[ _matcher_num -gt 1 ]] && return 1 local exp word sort expr expl subd suf=" " force opt asp tmp opre pre epre local continue=0 (( $# )) && while getopts gsco opt; do force="$force$opt" done if [[ "$funcstack[2]" = _prefix ]]; then word="$IPREFIX$PREFIX$SUFFIX" else word="$IPREFIX$PREFIX$SUFFIX$ISUFFIX" fi [[ "$word" = *\$(|\{[^\}]#) || ( "$word" = *\$[a-zA-Z0-9_]## && $+parameters[${word##*\$}] -eq 0 ) ]] && return 1 ### I'm not sure about the pattern to use in the following test. # It once was: # [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] && zstyle -T ":completion:${curcontext}:" suffix && [[ "$word" = (\~*/*|*\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|*\$\{*\}?) && "${(e)word}" != (#s)(*[^\\]|)[][^*?\(\)\<\>\{\}\|]* ]] && return 1 zstyle -s ":completion:${curcontext}:" accept-exact tmp || [[ ! -o recexact ]] || tmp=1 if [[ "$tmp" != (yes|true|on|1) ]]; then { [[ "$word" = \~(|[-+]) || ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ]] && return 1 } { [[ ( "$word" = \~* && ${#userdirs[(I)${word[2,-1]}*]}+${#nameddirs[(I)${word[2,-1]}*]} -gt 1 ) || ( "$word" = *\$[a-zA-Z0-9_]## && ${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && continue=1 } [[ continue -eq 1 && "$tmp" != continue ]] && return 1 fi # In exp we will collect the expansions. exp=("$word") # First try substitution. That weird thing spanning multiple lines # changes quoted spaces, tabs, and newlines into spaces and protects # this function from aborting on parse errors in the expansion. if [[ "$force" = *s* ]] || zstyle -T ":completion:${curcontext}:" substitute; then ### We once used this: ### ### [[ ! -o ignorebraces && "${#${exp}//[^\{]}" = "${#${exp}//[^\}]}" ]] && ### eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \) 2>/dev/null ### ### instead of the following loop to expand braces. But that made ### parameter expressions such as ${foo} be expanded like brace ### expansions, too (and with braceccl set...). if [[ ! $_comp_caller_options[ignorebraces] == on && "${#${exp}//[^\{]}" = "${#${exp}//[^\}]}" ]]; then local otmp tmp=${(q)word} while [[ $#tmp != $#otmp ]]; do otmp=$tmp tmp=${tmp//(#b)\\\$\\\{(([^\{\}]|\\\\{|\\\\})#)([^\\])\\\}/\\$\\\\{${match[1]}${match[3]}\\\\}} done eval exp\=\( ${tmp:gs/\\{/\{/:gs/\\}/\}/} \) 2>/dev/null fi ### There's a bug: spaces resulting from brace expansion are quoted in ### the following expression, too. We don't want that, but I have no ### idea how to fix it. setopt aliases eval 'exp=( ${${(e)exp//\\[ ]/ }//(#b)([ ])/\\$match[1]} )' 2>/dev/null setopt NO_aliases else exp=( ${exp:s/\\\$/\$} ) fi # If the array is empty, store the original string again. [[ -z "$exp" ]] && exp=("$word") subd=("$exp[@]") # Now try globbing. [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob && eval 'exp=( ${~exp//(#b)\\[ ]/$match[1]} ); exp=( ${(q)exp} )' 2>/dev/null ### Don't remember why we once used this instead of the (q) above. # eval 'exp=( ${~exp} ); exp=( ${exp//(#b)([][()|*?^#~<>\\=])/\\${match[1]}} )' 2>/dev/null # If we don't have any expansions or only one and that is the same # as the original string, we let other completers run. (( $#exp )) || exp=("$subd[@]") [[ $#exp -eq 1 && "${exp[1]//\\}" = "${word//\\}"(|\(N\)) ]] && return 1 # With subst-globs-only we bail out if there were no glob expansions, # regardless of any substitutions { [[ "$force" = *o* ]] || zstyle -t ":completion:${curcontext}:" subst-globs-only } && [[ "$subd" = "$exp"(|\(N\)) ]] && return 1 zstyle -s ":completion:${curcontext}:" keep-prefix tmp || tmp=changed if [[ "$word" = (\~*/*|*\$*/*) && "$tmp" = (yes|true|on|1|changed) ]]; then if [[ "$word" = *\$* ]]; then opre="${(M)word##*\$[^/]##/}" else opre="${word%%/*}" fi eval 'epre=( ${(e)~opre} )' 2> /dev/null if [[ -n "$epre" && $#epre -eq 1 ]]; then pre="${(q)epre[1]}" [[ ( "$tmp" != changed || $#exp -gt 1 || "${opre}${exp[1]#${pre}}" != "$word" ) && "${exp[1]}" = $pre* ]] && exp=( ${opre}${^exp#${pre}} ) fi [[ $#exp -eq 1 && "$exp[1]" = "$word" ]] && return 1 fi # Now add as matches whatever the user requested. zstyle -s ":completion:${curcontext}:" sort sort [[ "$sort" = (yes|true|1|on) ]] && exp=( "${(@o)exp}" ) if zstyle -s ":completion:${curcontext}:" add-space tmp; then if [[ "$tmp" != *subst* || "$word" != *\$* || "$exp[1]" = *\$* ]]; then [[ "$tmp" = *file* ]] && asp=file [[ "$tmp" = *(yes|true|1|on|subst)* ]] && asp="yes$asp" fi else asp=file fi # If there is only one expansion, add a suitable suffix if (( $#exp == 1 )); then if [[ -d ${exp[1]/${opre}/${pre}} && "$exp[1]" != */ ]]; then suf=/ elif [[ "$asp" = yes* || ( "$asp" = *file && -f "${exp[1]/${opre}/${pre}}" ) ]]; then suf=' ' else suf= fi fi if [[ -z "$compstate[insert]" ]] ;then if [[ "$sort" = menu ]]; then _description expansions expl expansions "o:$word" else _description -V expansions expl expansions "o:$word" fi compadd "$expl[@]" -UQ -qS "$suf" -a exp else _tags all-expansions expansions original if [[ $#exp -gt 1 ]] && _requested expansions; then local i j normal space dir if [[ "$sort" = menu ]]; then _description expansions expl expansions "o:$word" else _description -V expansions expl expansions "o:$word" fi normal=() space=() dir=() for i in "$exp[@]"; do j="${i/${opre}/${pre}}" if [[ -d "$j" && "$i" != */ ]]; then dir=( "$dir[@]" "$i" ) elif [[ "$asp" = yes* || ( "$asp" = *file && -f "$j" ) ]]; then space=( "$space[@]" "$i" ) else normal=( "$normal[@]" "$i" ) fi done (( $#dir )) && compadd "$expl[@]" -UQ -qS/ -a dir (( $#space )) && compadd "$expl[@]" -UQ -qS " " -a space (( $#normal )) && compadd "$expl[@]" -UQ -qS "" -a normal fi if _requested all-expansions expl 'all expansions'; then local disp dstr if [[ "${#${exp}}" -ge COLUMNS ]]; then disp=( -ld dstr ) dstr=( "${(r:COLUMNS-5:)exp} ..." ) else disp=() fi [[ -o multios ]] && exp=($exp[1] $compstate[redirect]${^exp[2,-1]}) compadd "$disp[@]" "$expl[@]" -UQ -qS "$suf" - "$exp" fi _requested original expl original && compadd "$expl[@]" -UQ - "$word" compstate[insert]=menu fi return continue