Server IP : 103.119.228.120 / Your IP : 3.141.42.41 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/share/zsh/5.0.2/functions/ |
Upload File : |
# Autoload this function, run `zle -N <func-name>' and bind <func-name> # to a key. # This allows incremental completion of a word. After starting this # command, a list of completion choices can be shown after every character # you type, which you can delete with ^h or DEL. RET will accept the # completion so far. You can hit TAB to do normal completion, ^g to # abort back to the state when you started, and ^d to list the matches. # # This works only with the new function based completion system. # Recommended settings: # zstyle ':completion:incremental:*' completer _complete _ignored # zstyle :incremental stop-keys $'[\e\C-b\C-f\C-n\C-p\C-u-\C-x]' # BUGS: # The _oldlist completer breaks incremental completion. Use a context- # specific completer zstyle as shown above to disable the _oldlist # completer in this function. # The main widget function. incremental-complete-word() { emulate -L zsh unsetopt autolist menucomplete automenu # doesn't work well local key lbuf="$LBUFFER" rbuf="$RBUFFER" pmpt pstr word local lastl lastr wid twid num post toolong local curcontext="${curcontext}" stop brk [[ -z "$curcontext" ]] && curcontext=::: curcontext="incremental:${curcontext#*:}" zstyle -s ":incremental" prompt pmpt || pmpt='incremental (%c): %u%s %l' zstyle -s ":incremental" stop-keys stop zstyle -s ":incremental" break-keys brk if zstyle -t ":incremental" list; then wid=list-choices post=( icw-list-helper ) else wid=complete-word post=() fi comppostfuncs=( "$post[@]" ) zle $wid "$@" LBUFFER="$lbuf" RBUFFER="$rbuf" num=$_lastcomp[nmatches] if (( ! num )); then word='' state='-no match-' elif [[ "${LBUFFER}${RBUFFER}" = *${_lastcomp[unambiguous]}* ]]; then word='' state='-no prefix-' else word="${_lastcomp[unambiguous]}" state='' fi zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" \ "l:$toolong" "c:${_lastcomp[completer]}" zle -R "$pstr" read -k key while [[ '#key' -ne '#\\r' && '#key' -ne '#\\n' && '#key' -ne '#\\C-g' ]]; do twid=$wid if [[ "$key" = ${~stop} ]]; then zle -U "$key" return elif [[ "$key" = ${~brk} ]]; then return elif [[ '#key' -eq '#\\C-h' || '#key' -eq '#\\C-?' ]]; then [[ $#LBUFFER -gt $#l ]] && LBUFFER="$LBUFFER[1,-2]" elif [[ '#key' -eq '#\\t' ]]; then zle complete-word "$@" lbuf="$LBUFFER" rbuf="$RBUFFER" elif [[ '#key' -eq '#\\C-d' ]]; then twid=list-choices else LBUFFER="$LBUFFER$key" fi if (( ! PENDING )); then lastl="$LBUFFER" lastr="$RBUFFER" [[ "$twid" = "$wid" ]] && comppostfuncs=( "$post[@]" ) toolong='' zle $twid "$@" LBUFFER="$lastl" RBUFFER="$lastr" num=$_lastcomp[nmatches] if (( ! num )); then word='' state='-no match-' elif [[ "${LBUFFER}${RBUFFER}" = *${_lastcomp[unambiguous]}* ]]; then word='' state='-no prefix-' else word="${_lastcomp[unambiguous]}" state='' fi zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" \ "l:$toolong" "c:${_lastcomp[completer]}" zle -R "$pstr" else zle -R fi read -k key done if [[ '#key' -eq '#\\C-g' ]]; then LBUFFER="$lbuf" RBUFFER="$rbuf" fi zle -Rc } # Helper function used as a completion post-function used to make sure that # the list of matches in only shown if it fits on the screen. icw-list-helper() { # +1 for the status line we will add... if [[ compstate[list_lines]+BUFFERLINES+1 -gt LINES ]]; then compstate[list]='list explanations messages' [[ compstate[list_lines]+BUFFERLINES+1 -gt LINES ]] && compstate[list]='' toolong='...' fi } incremental-complete-word "$@"