Server IP : 103.119.228.120 / Your IP : 3.144.109.159 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/share/zsh/5.0.2/functions/ |
Upload File : |
#compdef btrfs local curcontext="$curcontext" curstate state line expl grp cmd ret=1 local -a groups args groups=( subvolume filesystem device scrub balance inspect-internal help version ) cmds_1=( create delete list snapshot get-default set-default find-new help ) cmds_2=( df show sync defragment resize label balance help ) cmds_3=( add delete scan help ) cmds_4=( start cancel resume status help ) cmds_5=( start pause cancel resume status ) cmds_6=( inode-resolve logical-resolve help ) [[ $words[2] = h(|e(|l(|p))) ]] && args=( '--full[display detailed help]' ) _arguments -C "$args[@]" \ '(- *)--help[print help information]' \ '(- *)--version[print version information]' \ '(--version)1: :->groups' \ '2: :->cmds' \ '*:: :->args' && ret=0 while (( $#state )); do curstate=$state shift state case $curstate in groups) _wanted command-groups expl 'btrfs command group' compadd -a groups && ret=0 ;; cmds) : $words local grp=${groups[(i)$words[2]*]} : $grp (( grp && grp < 7 )) || return 1 curcontext="${curcontext%:*:*}:$service-${groups[grp]}:" _wanted commands expl command compadd -a cmds_$grp && ret=0 ;; args) : $words local grp=${groups[(i)$words[1]*]} (( grp && grp < 7 )) || return 1 local group=cmds_$grp local cmd=${${(P)group}[(i)$words[2]*]} (( cmd )) || return 1 curcontext="${curcontext%:*:*}:$service-${groups[grp]}-${${(P)group}[cmd]}:" args=( '(-)--help[print help information]' ) case ${groups[grp]}:${${(P)group}[cmd]} in filesystem:balance) if (( CURRENT == 3 )); then state+=cmds else shift words (( CURRENT-- )) state+=args fi continue ;; subvolume:create) args+=( '1:destination:->mounts' );; subvolume:delete) args+=( '1:subvolume:_files -/' );; subvolume:snapshot) args+=( '-r[readonly snapshot]' '1:snapshot:_files -/' );; subvolume:list) args+=( '-p[include parent ID in output]' '1:path:->mounts' );; subvolume:set-default) args+=( '1:id:_guard "[0-9]#" id' '2:path:->mounts' );; filesystem:resize) args+=( '1:size:_guart "(|+|-)[0-9]#[GKM]"' '2:path:->mounts' );; filesystem:defragment) args+=( '-v[verbose]' '-c[compress files while defragmenting]' '-f[flush after defragmenting]' '-s[start position]:byte position' '-l[defragment limited number of bytes]:length (bytes)' '-t[defragment only files over a certain size]:minimum size (bytes)' '*:file:_files' ) ;; filesystem:label) args+=( '1:device:_files -g "*(d)"' '2:label' );; filesystem:show) args+=( '(1 -)--all-devices[scan all devices in /dev]' '1: :_guard "^-*" uuid or label' );; device:(add|delete)) args+=( '1:device:_files -g "*(d)"' '2:path:->mounts' );; device:scan) args+=( '(1 -)--all-devices[scan all devices in /dev]' '1:device:_files -g "*(d)"' );; scrub:(start|resume)) args+=( "-B[don't background and print statistics at end]" '-d[print separate statistics for each device]' '-q[omit error message and statistics]' '-r[read only mode]' '-u[scrub unused space too]' '1:path or device:_files' ) ;; scrub:cancel) args+=( '1:path or device' );; scrub:status) args+=( '-d[separate statistics for each device]' '1:path or device:_files' );; balance:start) args+=( '(-m -s)-d+[act on data chunks]:filter:->filters' '(-d -s)-m+[act on metadata chunks]:filter:->filters' '(-d -m)-s+[act on system chunks (only under -f)]:filters:->filters' '-v[verbose mode]' '-f[force reducing of metadata integrity]' '1:path:_files -/' ) ;; balance:status) args+=( '-v[verbose mode]' '2:path:_files -/' );; balance:(pause|cancel|resume)) args+=( '2:path:_files -/' );; inspect*:inode*) args+=( '-v[verbose mode]' '1:inode:_files' '2:path:_files -/' );; inspect*:logical*) args+=( '-v[verbose mode]' '-P[skip the path resolving and print the inodes instead]' '1:logical address:_files' '2:filesystem path:_files -/' ) ;; subvolume:get-default) ;& *:sync) ;& *:df) args+=( '1:path:->mounts' );; *) args+=( '*: :_default' );; # fallback for unknown subcommands esac shift words (( CURRENT-- )) _arguments -C "$args[@]" && ret=0 ;; mounts) _wanted mount-points expl 'mount point' compadd \ ${${${(M)${(f)"$(</etc/mtab)"}:#*btrfs*}#* }%% *} && ret=0 ;; filters) state=() _values -s , filter \ 'profiles[balance only block groups in given replication profiles]:profile:->profiles' \ 'usage[balance block groups with usage below percentage]:percentage' \ 'devid[limit by device ID]:device ID' \ 'drange[balance block groups overlapping byte range]:range' \ 'vrange[balance block groups overlapping byte range in virtual address space]:range' \ 'convert[convert block groups to given profile]:profile:->profiles' \ 'soft[leave chunks that already have target profile]' && ret=0 state=( $state ) ;; profiles) compset -P '*\|' _values -s ',' profile raid0 raid1 raid10 dup single && ret=0 ;; esac done return ret