diff options
Diffstat (limited to 'Functions')
-rw-r--r-- | Functions/.distfiles | 1 | ||||
-rw-r--r-- | Functions/Calendar/.distfiles | 12 | ||||
-rw-r--r-- | Functions/Chpwd/.distfiles | 7 | ||||
-rw-r--r-- | Functions/Compctl/.distfiles | 2 | ||||
-rw-r--r-- | Functions/Example/.distfiles | 4 | ||||
-rw-r--r-- | Functions/Exceptions/.distfiles | 2 | ||||
-rw-r--r-- | Functions/MIME/.distfiles | 5 | ||||
-rw-r--r-- | Functions/Misc/.distfiles | 32 | ||||
-rw-r--r-- | Functions/Newuser/.distfiles | 2 | ||||
-rw-r--r-- | Functions/Prompts/.distfiles | 20 | ||||
-rw-r--r-- | Functions/TCP/.distfiles | 5 | ||||
-rw-r--r-- | Functions/TCP/tcp_expect | 35 | ||||
-rw-r--r-- | Functions/VCS_Info/.distfiles | 19 | ||||
-rw-r--r-- | Functions/VCS_Info/Backends/.distfiles | 25 | ||||
-rw-r--r-- | Functions/Zftp/.distfiles | 8 | ||||
-rw-r--r-- | Functions/Zle/.distfiles | 48 |
16 files changed, 29 insertions, 198 deletions
diff --git a/Functions/.distfiles b/Functions/.distfiles index e538ad218..f03668b3a 100644 --- a/Functions/.distfiles +++ b/Functions/.distfiles @@ -1,3 +1,2 @@ DISTFILES_SRC=' - .cvsignore .distfiles README.zftp ' diff --git a/Functions/Calendar/.distfiles b/Functions/Calendar/.distfiles index 7c14c384a..f03668b3a 100644 --- a/Functions/Calendar/.distfiles +++ b/Functions/Calendar/.distfiles @@ -1,14 +1,2 @@ DISTFILES_SRC=' -.distfiles -age -calendar -calendar_add -calendar_edit -calendar_lockfiles -calendar_parse -calendar_read -calendar_scandate -calendar_show -calendar_showdate -calendar_sort ' diff --git a/Functions/Chpwd/.distfiles b/Functions/Chpwd/.distfiles index 89779a686..f03668b3a 100644 --- a/Functions/Chpwd/.distfiles +++ b/Functions/Chpwd/.distfiles @@ -1,9 +1,2 @@ DISTFILES_SRC=' -.distfiles -cdr -_cdr -chpwd_recent_add -chpwd_recent_dirs -chpwd_recent_filehandler -zsh_directory_name_cdr ' diff --git a/Functions/Compctl/.distfiles b/Functions/Compctl/.distfiles index d4eea91f5..f03668b3a 100644 --- a/Functions/Compctl/.distfiles +++ b/Functions/Compctl/.distfiles @@ -1,4 +1,2 @@ DISTFILES_SRC=' -.distfiles -cdmatch cdmatch2 multicomp ' diff --git a/Functions/Example/.distfiles b/Functions/Example/.distfiles index 26cffafbf..f03668b3a 100644 --- a/Functions/Example/.distfiles +++ b/Functions/Example/.distfiles @@ -1,6 +1,2 @@ DISTFILES_SRC=' -.distfiles -acx cx pushd yp zless -cat proto randline yu zls -zpgrep ' diff --git a/Functions/Exceptions/.distfiles b/Functions/Exceptions/.distfiles index 8b697438c..f03668b3a 100644 --- a/Functions/Exceptions/.distfiles +++ b/Functions/Exceptions/.distfiles @@ -1,4 +1,2 @@ DISTFILES_SRC=' -.distfiles -catch throw ' diff --git a/Functions/MIME/.distfiles b/Functions/MIME/.distfiles index 93c13f7da..f03668b3a 100644 --- a/Functions/MIME/.distfiles +++ b/Functions/MIME/.distfiles @@ -1,7 +1,2 @@ DISTFILES_SRC=' -.distfiles -pick-web-browser -zsh-mime-contexts -zsh-mime-handler -zsh-mime-setup ' diff --git a/Functions/Misc/.distfiles b/Functions/Misc/.distfiles index 5efb17876..f03668b3a 100644 --- a/Functions/Misc/.distfiles +++ b/Functions/Misc/.distfiles @@ -1,34 +1,2 @@ DISTFILES_SRC=' -.distfiles -add-zsh-hook -allopt -checkmail -colors -getjobs -harden -is-at-least -mere -nslookup -promptnl -regexp-replace -relative -run-help -run-help-git -run-help-openssl -run-help-p4 -run-help-sudo -run-help-svk -run-help-svn -sticky-note -tetris -xtermctl -zargs -zcalc -zed -zkbd -zmathfuncdef -zmv -zrecompile -zstyle+ -ztodo ' diff --git a/Functions/Newuser/.distfiles b/Functions/Newuser/.distfiles index 9012263a2..f03668b3a 100644 --- a/Functions/Newuser/.distfiles +++ b/Functions/Newuser/.distfiles @@ -1,4 +1,2 @@ DISTFILES_SRC=' -.distfiles -zsh-newuser-install ' diff --git a/Functions/Prompts/.distfiles b/Functions/Prompts/.distfiles index dd18a5e41..f03668b3a 100644 --- a/Functions/Prompts/.distfiles +++ b/Functions/Prompts/.distfiles @@ -1,20 +1,2 @@ DISTFILES_SRC=' -.distfiles -prompt_adam1_setup -prompt_adam2_setup -prompt_bart_setup -prompt_bigfade_setup -prompt_clint_setup -prompt_elite2_setup -prompt_elite_setup -prompt_fade_setup -prompt_fire_setup -prompt_off_setup -prompt_oliver_setup -prompt_pws_setup -prompt_redhat_setup -prompt_special_chars -prompt_suse_setup -prompt_walters_setup -prompt_zefram_setup -promptinit' +' diff --git a/Functions/TCP/.distfiles b/Functions/TCP/.distfiles index 00d37ca54..f03668b3a 100644 --- a/Functions/TCP/.distfiles +++ b/Functions/TCP/.distfiles @@ -1,7 +1,2 @@ DISTFILES_SRC=' -.distfiles -tcp_command tcp_log tcp_proxy tcp_send tcp_talk -tcp_alias tcp_expect tcp_open tcp_read tcp_sess tcp_wait -tcp_close tcp_fd_handler tcp_output tcp_rename tcp_spam -tcp_point tcp_shoot ' diff --git a/Functions/TCP/tcp_expect b/Functions/TCP/tcp_expect index 1c63b8def..eef39ad06 100644 --- a/Functions/TCP/tcp_expect +++ b/Functions/TCP/tcp_expect @@ -25,6 +25,15 @@ # set it to 0. # To avoid namespace clashes, the parameter's name must # not begin with `_expect'. +# -P pv This is similar to -p, however in this case the +# arguments to tcp_expect following the options are expected +# to start with a prefix "<tag>:". The parameter $pv is +# then set to the value "<tag>" rather than the numeric +# index of the parameter. The string "timeout" is used +# as the tag for a timeout specified by -t and -T and +# on a failed match the variable is set to the empty string. +# It is not an error for multiple arguments to have +# the same tag or to use a reserved value of the tag. # -q Quiet, passed down to tcp_read. Bad option and argument # usage is always reported. # -s sess @@ -45,18 +54,18 @@ if [[ ${(t)SECONDS} != float* ]]; then fi # Variables are all named _expect_* to avoid problems with the -p param. -local _expect_opt _expect_pvar +local _expect_opt _expect_pvar _expect_state _expect_arg _expect_ind local -a _expect_read_args float _expect_to1 _expect_to_all _expect_to _expect_new_to -integer _expect_i _expect_stat +integer _expect_i _expect_stat _expect_states -while getopts "al:p:qs:t:T:" _expect_opt; do +while getopts "al:p:P:qs:t:T:" _expect_opt; do case $_expect_opt in (a) _expect_read_args+=(-a) ;; (l) _expect_read_args+=(-l $OPTARG) ;; - (p) _expect_pvar=$OPTARG + ([pP]) _expect_pvar=$OPTARG if [[ $_expect_pvar != [a-zA-Z_][a-zA-Z_0-9]# ]]; then print "invalid parameter name: $_expect_pvar" >&2 return 1 @@ -65,7 +74,12 @@ while getopts "al:p:qs:t:T:" _expect_opt; do print "$0: parameter names staring \`_expect' are reserved." return 1 fi - eval "$_expect_pvar=0" + if [[ $_expect_opt = "P" ]]; then + eval "$_expect_pvar=0" + _expect_states=1 + else + eval "$_expect_pvar=" + fi ;; (q) _expect_read_args+=(-q) ;; @@ -112,8 +126,15 @@ while true; do fi tcp_expect_lines+=($TCP_LINE) for (( _expect_i = 1; _expect_i <= $#; _expect_i++ )); do - if [[ "$TCP_LINE" = ${~argv[_expect_i]} ]]; then - [[ -n $_expect_pvar ]] && eval "$_expect_pvar=\$_expect_i" + if [[ _expect_states -ne 0 && $argv[_expect_i] = (#b)([^:]#):(*) ]]; then + _expect_ind=$match[1] + _expect_arg=$match[2] + else + _expect_ind=$_expect_i + _expect_arg=$argv[_expect_i] + fi + if [[ "$TCP_LINE" = ${~_expect_arg} ]]; then + [[ -n $_expect_pvar ]] && eval "$_expect_pvar=\$_expect_ind" return 0 fi done diff --git a/Functions/VCS_Info/.distfiles b/Functions/VCS_Info/.distfiles index b6e55d2fc..f03668b3a 100644 --- a/Functions/VCS_Info/.distfiles +++ b/Functions/VCS_Info/.distfiles @@ -1,21 +1,2 @@ DISTFILES_SRC=' -.distfiles -vcs_info -vcs_info_hookadd -vcs_info_hookdel -VCS_INFO_adjust -VCS_INFO_bydir_detect -VCS_INFO_check_com -VCS_INFO_formats -VCS_INFO_get_cmd -VCS_INFO_hook -vcs_info_lastmsg -VCS_INFO_maxexports -VCS_INFO_nvcsformats -vcs_info_printsys -VCS_INFO_quilt -VCS_INFO_realpath -VCS_INFO_reposub -VCS_INFO_set -vcs_info_setsys ' diff --git a/Functions/VCS_Info/Backends/.distfiles b/Functions/VCS_Info/Backends/.distfiles index 67fb06cda..f03668b3a 100644 --- a/Functions/VCS_Info/Backends/.distfiles +++ b/Functions/VCS_Info/Backends/.distfiles @@ -1,27 +1,2 @@ DISTFILES_SRC=' -.distfiles -VCS_INFO_detect_bzr -VCS_INFO_detect_cdv -VCS_INFO_detect_cvs -VCS_INFO_detect_darcs -VCS_INFO_detect_fossil -VCS_INFO_detect_git -VCS_INFO_detect_hg -VCS_INFO_detect_mtn -VCS_INFO_detect_p4 -VCS_INFO_detect_svk -VCS_INFO_detect_svn -VCS_INFO_detect_tla -VCS_INFO_get_data_bzr -VCS_INFO_get_data_cdv -VCS_INFO_get_data_cvs -VCS_INFO_get_data_darcs -VCS_INFO_get_data_fossil -VCS_INFO_get_data_git -VCS_INFO_get_data_hg -VCS_INFO_get_data_mtn -VCS_INFO_get_data_p4 -VCS_INFO_get_data_svk -VCS_INFO_get_data_svn -VCS_INFO_get_data_tla ' diff --git a/Functions/Zftp/.distfiles b/Functions/Zftp/.distfiles index c8d8f8152..f03668b3a 100644 --- a/Functions/Zftp/.distfiles +++ b/Functions/Zftp/.distfiles @@ -1,10 +1,2 @@ DISTFILES_SRC=' -.distfiles -zfanon zfdir zfinit zfrglob zftype -zfautocheck zffcache zfls zfrtime zfuget -zfcd zfgcp zfmark zfsession zfuput -zfcd_match zfget zfopen zfstat -zfcget zfget_match zfparams zftp_chpwd -zfclose zfgoto zfpcp zftp_progress -zfcput zfhere zfput zftransfer ' diff --git a/Functions/Zle/.distfiles b/Functions/Zle/.distfiles index 90a07690b..f03668b3a 100644 --- a/Functions/Zle/.distfiles +++ b/Functions/Zle/.distfiles @@ -1,50 +1,2 @@ DISTFILES_SRC=' -.distfiles -backward-kill-word-match -backward-word-match -capitalize-word-match -copy-earlier-word -cycle-completion-positions -define-composed-chars -delete-whole-word-match -down-case-word-match -down-line-or-beginning-search -edit-command-line -expand-absolute-path -forward-word-match -history-beginning-search-menu -history-pattern-search -history-search-end -incarg -incremental-complete-word -insert-composed-char -insert-files -insert-unicode-char -keeper -keymap+widget -kill-word-match -match-word-context -match-words-by-style -modify-current-argument -move-line-in-buffer -narrow-to-region -narrow-to-region-invisible -predict-on -quote-and-complete-word -read-from-minibuffer -replace-argument -replace-string -replace-string-again -select-word-style -send-invisible -smart-insert-last-word -split-shell-arguments -transpose-lines -transpose-words-match -up-case-word-match -up-line-or-beginning-search -url-quote-magic -which-command -zcalc-auto-insert -zed-set-file-name ' |