Server IP : 103.119.228.120 / Your IP : 18.219.207.11 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 : |
#!/bin/zsh # zed # # No other shell could do this. # Edit small files with the command line editor. # Use ^X^W to save, ^C to abort. # Option -f: edit shell functions. (Also if called as fned.) local var opt zed_file_name # We do not want timeout while we are editing a file integer TMOUT=0 okargs=1 fun bind while getopts "fb" opt; do case $opt in (f) fun=1 ;; (b) bind=1 ;; esac done shift $(( OPTIND - 1 )) [[ $0 = fned ]] && fun=1 (( bind )) && okargs=0 if (( $# != okargs )); then echo 'Usage: zed filename zed -f function zed -b' return 1 fi local curcontext=zed::: zstyle -m ":completion:zed:*" insert-tab '*' || zstyle ":completion:zed:*" insert-tab yes if (( bind )) || ! bindkey -M zed >&/dev/null; then # Make the zed keymap a copy of the current main. bindkey -N zed main # Save the current main. In zle widgets called from # zed we may want to set this temporally. bindkey -A main zed-normal-keymap # Assign some default keys. # Depending on your stty's, you may be able to use ^J as accept-line, else: # The following isn't useful if we are copying viins, but that's # a nicety. bindkey -M zed '^x^w' accept-line bindkey -M zed '^M' self-insert-unmeta # Make zed-set-file-name available. # Assume it's in fpath; there's no error at this point if it isn't autoload -Uz zed-set-file-name zle -N zed-set-file-name fi if (( bind )) || ! bindkey -M zed-vicmd >&/dev/null; then bindkey -N zed-vicmd vicmd bindkey -M zed-vicmd "ZZ" accept-line fi (( bind )) && return 0 # don't mangle !'s setopt localoptions nobanghist if ((fun)) then var="$(functions $1)" # If function is undefined but autoloadable, load it if [[ $var = *\#\ undefined* ]] then var="$(autoload +X $1; functions $1)" elif [[ -z $var ]] then var="$1() { }" fi vared -M zed -m zed-vicmd var && eval function "$var" else zed_file_name=$1 [[ -f $1 ]] && var="$(<$1)" while vared -M zed -m zed-vicmd var do { print -r -- "$var" >| $zed_file_name } always { (( TRY_BLOCK_ERROR = 0 )) } && break echo -n -e '\a' done fi return 0 # End of zed