diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-13 16:17:08 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-13 16:17:08 +0000 |
commit | d2b14d6baa162305a2b1678fddb05b2d152a3cac (patch) | |
tree | 1266820c864db9dd7a7ac471f7cc4e02f29d7d1a | |
parent | 5dcad54926186c572d7dd653c1d621246048479f (diff) | |
download | zsh-d2b14d6baa162305a2b1678fddb05b2d152a3cac.tar.gz zsh-d2b14d6baa162305a2b1678fddb05b2d152a3cac.tar.xz zsh-d2b14d6baa162305a2b1678fddb05b2d152a3cac.zip |
zsh-3.1.6-pws-4 zsh-3.1.6-pws-4
-rw-r--r-- | ChangeLog | 214 | ||||
-rw-r--r-- | Completion/Base/.distfiles | 2 | ||||
-rw-r--r-- | Completion/Base/_arguments | 6 | ||||
-rw-r--r-- | Completion/Commands/.distfiles | 2 | ||||
-rw-r--r-- | Completion/Debian/.distfiles | 2 | ||||
-rw-r--r-- | Completion/Debian/_apt | 5 | ||||
-rw-r--r-- | Completion/User/.distfiles | 12 | ||||
-rw-r--r-- | Completion/User/_man | 10 | ||||
-rw-r--r-- | Completion/User/_patch | 2 | ||||
-rw-r--r-- | Config/version.mk | 2 | ||||
-rw-r--r-- | Functions/Zftp/.distfiles | 8 | ||||
-rw-r--r-- | Functions/Zle/.distfiles | 3 | ||||
-rw-r--r-- | Functions/Zle/history-search-end | 28 | ||||
-rw-r--r-- | Functions/Zle/predict-on | 64 | ||||
-rw-r--r-- | Src/builtin.c | 2 | ||||
-rw-r--r-- | Src/subst.c | 2 | ||||
-rw-r--r-- | Src/zsh.export | 1 |
17 files changed, 334 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog index b02b24993..3b54a2c65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,221 @@ +1999-09-13 Peter Stephenson <pws@ibmth.df.unipi.it> + + * pws: Config/version.mk: 3.1.6-pws-4. + + * Tanaka Akira: 7806: Completion/Users/_pbm: missing backslash. + + * Sven: 7804: Completion/Base/_arguments: `no more arguments' + message. + + * Sven: 7801: Completion/Base/_arguments: listing problem with + arguments. + + * Sven: 7800: Completion/Core/_normal: terminate whence options to + avoid error message. + + * Sven: 7798: Doc/Zsh/compwid.yo, Src/Zle/comp.h, + Src/Zle/compctl.c, Src/Zle/zle_tricky.c, + Completion/Base/_brace_parameter, Completion/Base/_parameter, + Completion/Core/_parameters: compadd -e treats arguments as + parameters for AUTO_PARAM_SLASH and AUTO_PARAM_KEYS. + + * Sven: 7797: Doc/Zsh/compsys.yo, + Completion/Commands/_verbose_list, Completion/Core/_oldlist: + _verbose_list widget makes completion function lists + progressively more verbose. + + * Sven: 7795: Completion/User/_mount: mounting excitement. + + * Sven: 7793: Completion/User/_ispell: ispell completions. + + * Sven: 7792: Completion/User/_bison, Completion/User/_flex: + not particularly hairy bison and flex completions. + + * Sven: 7791: Src/Zle/zle_tricky.c: completion code numbers. + + * Sven: 7790: Completion/User/_pbm, Completion/User/_ssh, + Completion/Linux/_rpm: miscellaneous tidying. + + * Sven: 7789: Completion/User/_tiff: completions for conversions + to/from tiff format. + + * Bart: 7784, 7787: Src/utils.c: memory use in bslashquote + (cf. 7713). + + * Tanaka Akira: 7779, 7781: Completion/User/_hosts, + Completion/User/_telnet, Completion/User/_socket: telnet and + socket completions with ports. + + * Bart and pws: 2592: Functions/Zle/history-search-end, + Functions/Zle/predict-on: new Zle functions for fancy history + searching. + + * Tanaka Akira: 7778: Completion/Base/_regex_arguments: implement + cache. + + * Tanaka Akira: 7777: Completion/Base/_regex_arguments, + Completion/Debian/_apt: more apt utilities handled, condensed to + single file; _apt-cache, _apt-get and _apt_arguments deleted. + +1999-09-10 Peter Stephenson <pws@ibmth.df.unipi.it> + + * pws: 7767: Completion/Builtins/_zftp, Doc/Zsh/mod_zftp.yo, + Doc/Zsh/zftpsys.yo, Functions/Zftp/zfanon, + Functions/Zftp/zfautocheck, Functions/Zftp/zfcd, + Functions/Zftp/zfcd_match, Functions/Zftp/zfcget, + Functions/Zftp/zfdir, Functions/Zftp/zffcache, + Functions/Zftp/zfgcp, Functions/Zftp/zfget, + Functions/Zftp/zfget_match, Functions/Zftp/zfgoto, + Functions/Zftp/zfinit, Functions/Zftp/zfmark, + Functions/Zftp/zfopen, Functions/Zftp/zfparams, + Functions/Zftp/zfpcp, Functions/Zftp/zfrglob, + Functions/Zftp/zfsession, Functions/Zftp/zfstat, + Functions/Zftp/zftp_chpwd, Functions/Zftp/zftp_progress, + Functions/Zftp/zftransfer, Functions/Zftp/zfuget, + Functions/Zftp/zfuput, Src/Modules/zftp.c: + new session management for zftp (session, rmsession); new + functions zfsession, zftransfer, zffcache; various completion + and argument-handling improvements. + + * pws: 7765: Src/builtin.c, Src/exec.c: getopts didn't reset + counter for index into option list properly; didn't set option + variable to "?" when printing its own error message. + + * Tanaka Akira: 7763: Completion/Base/_arguments: bad argument + indexing. + +1999-09-09 Peter Stephenson <pws@ibmth.df.unipi.it> + + * Sven: 7750: Completion/Base/_arguments: fix option aliasing. + + * Tanaka Akira: 7748: Completion/User/_urls, + Completion/Core/_display: missing "$@" and X. + + * Sven: 7747: Doc/Zsh/compsys.yo, Completion/Base/_first, + Completion/Commands/_history_complete_word, + Completion/User/_cvs, Completion/User/_groups, + Etc/completion-style-guide: Mainly documentation changes: group + configuration keys into a single section. + + * Tanaka Akira: 7744: Completion/User/_patch: argument changes. + + * Sven: 7739: Completion/User/_rlogin: improvements. + + * pws: 7738: Completion/User/_man: didn't work with correction + and approximation. + + * Sven: 7737: Completion/User/_ssh, Completion/User/_users: + slogin, scp, and user@host; use array $users if defined. + + * Sven: 7736: Src/Zle/zle_tricky.c, Completion/Core/_display: + + * Sven: 7734: Src/Zle/complist.c, Src/Zle/zle_tricky.c: + displays of lists with disparate lengths and different groups of + matches with the same name. + + * Tanaka Akira: 7729, 7735: Completion/Debian/_apt-get, + Completion/Debian/_apt_arguments, Completion/Debian/_apt-cache: + apt-get and apt-cache completion improvments. + +1999-09-08 Peter Stephenson <pws@ibmth.df.unipi.it> + + * Tanaka Akira: 7723: Completion/User/_cvs: typo. + + * Sven: 7722: Completion/User/_dvi, Completion/User/_rlogin, + Completion/User/_ssh, Completion/User/_yodl, + Completion/User/_yp: new _yodl and all-round improvements. + + * Tanaka Akira: 7720: Completion/Base/_regex_arguments, + Completion/Debian/_apt_arguments, _apt-get: regular expression + argument parsing, used for apt-get. + + * Sven: 7718, 7719: Completion/Base/_arguments, + Completion/Linux/_rpm, Doc/Zsh/compsys.yo: better handling for + combined single-letter options. + + * Sven: 7716: Completion/Core/_complete, Completion/Core/_normal, + Completion/Base/_precommand: modify 7693 so that _normal always + resets _compskip unless called from _complete (via -s option). + + * Sven: 7714: Src/Zle/zle_tricky.c: problem displaying multiople + completion messages. + + * Sven: 7713: Src/utils.c: buffer for backslash quoting was too + short. + + * Sven: 7712: Src/text.c: fix core dump in case. + + * Bart: 7707: Config/installfns.sh, Config/uninstallfns.sh: + insert $DESTDIR as internal prefix of $fndir. + + * Bart, Tanaka Akira: 7705, 7706, 7709: Completion/User/_cvs: + select cvs function by substitution. + + * Clint: 7704: Makefile.in, Completion/Makefile.in, + Doc/Makefile.in, Functions/Makefile.in: betting distclean for + Completion/Makefile, Functions/Makefile, Config/defs.mk. + + * Clint: 7703: Config/installfns.sh: $DESTDIR prefixes $fndir. + + * Bart: 7697: Src/subst.c: sroted -> sorted. + +1999-09-07 Peter Stephenson <pws@ibmth.df.unipi.it> + + * pws: 7693: Completion/Base/_precommand: unset _compskip for + redoing _normal after _precommand. + + * Sven: 7690: Completion/Base/_arguments, Completion/User/_gprof, + Completion/User/_gs, Completion/User/_gv, + Completion/User/_patch, Completion/User/_xargs, + Completion/X/_x_arguments, Completion/X/_xt_arguments, + Doc/Zsh/compsys.yo: more exclusion lists and states, different + return value for using states. + + * Sven: 7687: Completion/Base/_arguments, Completion/User/_yp, + Doc/Zsh/compsys.yo: _arguments allows case where an option turns + off normal argument handling, new _yp function, space in action + means no action. + + * Sven: zsh-users/2576, zsh-users/2578: fix typeset -Z and typeset + -R. + + * Tanaka Akira: 7675: Completion/User/_hosts: remove nslookup, + since that uses _nslookup. + + * Adam: 7674: Doc/Zsh/compsys.yo, Etc/completion-style-guide: + typos. + + * Adam: 7671: Completion/Linux/_rpm: tyeset -> typeset, + build_b completes *.spec. + + * Tanaka Akira: 7670, 7686: Completion/User/_cvs, INSTALL, + configure.in: _cvs back in one function, remove Completion/Cvs. + + * John Williams: 7669: Src/builtin.c: __CYGWIN should be __CYGWIN__ + 1999-09-06 Peter Stephenson <pws@ibmth.df.unipi.it> + * Sven: 7662: Etc/completion-style-guide: subcommands and using + funcall to test state functions. + + * pws: 7660: Src/Modules/cap.c: changes as per 7591; initialize + variables to silence compiler. + + * Sven: 7656: Doc/Zsh/compsys.yo: display fixes. + + * Sven: 7655: Src/Zle/zle_tricky.c: bug completing on continuation + line. + + * Sven: 7654: Src/Zle/zle_thingy.c: error calling zle -R outside + widget. + * pws: Config/version.mk: 3.1.6-pws-3 + * Sven: 7652: Doc/Zsh/compsys.yo, Completion/Base/_values, + Completion/User/_hosts, Completion/User/_nslookup, + Functions/Misc/nslookup: complete assignment-like arguments, + nslookup wrapper with completion. + * pws: 7651: Doc/Zsh/options.yo: document HIST_FIND_NO_DUPS. * Sven: 7650: Doc/Zsh/compsys.yo, Completion/Base/_arguments, diff --git a/Completion/Base/.distfiles b/Completion/Base/.distfiles index 13e60b400..1c2c49fa2 100644 --- a/Completion/Base/.distfiles +++ b/Completion/Base/.distfiles @@ -2,6 +2,6 @@ DISTFILES_SRC=' .distfiles _arguments _brace_parameter _command_names _condition _default _equal _first - _math _parameter _precommand _redirect _subscript + _math _parameter _precommand _redirect _regex_arguments _subscript _tilde _values _vars ' diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 808bfc2ab..7d5aa9ca9 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -561,7 +561,7 @@ while [[ cur -gt 0 ]]; do uns="${ws[1][2,-1]}" if [[ -n "$uns" ]]; then - uns="${(@j::)${(M@)${(v)=xors[(I)${ws[1][1]}[$uns]]}:#??}#[-+]}" + uns="${(@j::)${(v)=xors[(I)${ws[1][1]}[$uns]]}#[-+]}" if [[ -n "$uns" ]]; then tmp=( "opts[${(@)^opts[(I)${ws[1][1]}[$uns]]}]" @@ -677,11 +677,11 @@ if [[ -z "$def" || "$def" = :* ]]; then done fi - [[ -n "$sopts" && -n "$opt" && "$PREFIX" = [-+]${~soptseq}[$sopts] ]] && + [[ -n "$sopts" && -n "$opt" && "$PREFIX" = [-+]${~soptseq}[$sopts] ]] && \ uns="${PREFIX[2,-1]}" if [[ -n "$uns" ]]; then - uns="${(@j::)${(M@)${(v)=xors[(I)${ws[1][1]}[$uns]]}:#??}#[-+]}" + uns="${(@j::)${(v)=xors[(I)${ws[1][1]}[$uns]]}#[-+]}" if [[ -n "$uns" ]]; then tmp=( "opts[${(@)^opts[(I)${pre[1]}[$uns]]}]" diff --git a/Completion/Commands/.distfiles b/Completion/Commands/.distfiles index 7fef35230..74072b5de 100644 --- a/Completion/Commands/.distfiles +++ b/Completion/Commands/.distfiles @@ -1,4 +1,4 @@ DISTFILES_SRC=' .distfiles _correct_filename _correct_word _expand_word - _history_complete_word _read_comp _most_recent_file + _history_complete_word _read_comp _most_recent_file _verbose_list ' diff --git a/Completion/Debian/.distfiles b/Completion/Debian/.distfiles index b2064b60c..fd37cf014 100644 --- a/Completion/Debian/.distfiles +++ b/Completion/Debian/.distfiles @@ -1,5 +1,5 @@ DISTFILES_SRC=' .distfiles - _apt-get _deb_packages + _apt _deb_packages ' diff --git a/Completion/Debian/_apt b/Completion/Debian/_apt index 7654ce1fe..fe909bda3 100644 --- a/Completion/Debian/_apt +++ b/Completion/Debian/_apt @@ -374,8 +374,6 @@ _apt-get () { --no-upgrade:bool \ --force-yes:bool \ --print-uris:bool \ - --purge:bool \ - --list-cleanup:bool \ -c,--config-file:configfile \ -o,--option:arbitem \ -- \ @@ -427,8 +425,7 @@ _apt-cache () { /$'check\0' \| \ /$'search\0' \| \ /$'show\0' \| \ - /$'depends\0' \| \ - /"[]" !'compadd "$expl_action[@]" help add gencaches showpkg stats dump dumpavail unmet check search show depends' + /"[]" !'compadd "$expl_action[@]" help add gencaches showpkg stats dump dumpavail unmet check search show' _apt-cache () { local expl_action expl_packages expl_pkg_cache expl_src_cache diff --git a/Completion/User/.distfiles b/Completion/User/.distfiles index caf25f120..b17ca6488 100644 --- a/Completion/User/.distfiles +++ b/Completion/User/.distfiles @@ -1,9 +1,9 @@ DISTFILES_SRC=' .distfiles - _a2ps _bunzip2 _bzip2 _chown _compress _configure _dd _dir_list _dvi - _exec_funcs _find _gdb _gprof _groups _gs _gs_name _gunzip _gv _gzip - _hosts _lynx _make _man _mh _nslookup _patch _pbm _pdf _perl_basepods - _perl_builtin_funcs _perl_modules _perldoc _ps _pspdf _rcs _rlogin _sh - _strip _stty _su _tar _tar_archive _tex _uncompress _urls _use_lo - _users _xargs + _a2ps _bison _bunzip2 _bzip2 _chown _compress _configure _cvs _dd + _dir_list _dvi _find _flex _gdb _gprof _groups _gs _gunzip _gv _gzip + _hosts _ispell _lynx _make _man _man.old _mh _mount _nslookup _patch + _pbm _pdf _perl_basepods _perl_builtin_funcs _perl_modules _perldoc _ps + _pspdf _rcs _rlogin _sh _socket _ssh _strip _stty _su _tar _tar_archive + _telnet _tex _tiff _uncompress _urls _use_lo _users _xargs _yodl _yp ' diff --git a/Completion/User/_man b/Completion/User/_man index 8ae64e239..ebe9a432e 100644 --- a/Completion/User/_man +++ b/Completion/User/_man @@ -1,6 +1,6 @@ #compdef man -setopt localoptions rcexpandparam extendedglob +setopt localoptions rcexpandparam local rep expl star approx @@ -14,14 +14,12 @@ if [[ -n $_comp_correct ]]; then approx="(#a${_comp_correct})" fi -# `sman' is the SGML manual directory for Solaris 7. - if [[ $words[2] = (<->*|ln) ]]; then rep=( - $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) ) + $manpath/(man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) ) else - rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) ) + rep=( $manpath/(man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t:r) ) fi _description expl 'manual page' -(( $#rep )) && compadd "$expl[@]" - ${rep%%.[^.]##(.gz|)} +(( $#rep )) && compadd "$expl[@]" - $rep diff --git a/Completion/User/_patch b/Completion/User/_patch index 2b6ad5f94..6be2afd62 100644 --- a/Completion/User/_patch +++ b/Completion/User/_patch @@ -24,7 +24,7 @@ _arguments -s \ '(--ifdef)-D+:name:' \ '(--version-control)-V+:version control style:(simple numbered existing)' \ '(--prefix)-B+:backup path prefix:' \ - '(--suffix)-b+:backup extension:' \ + '(--suffix)-b:backup extension:' \ '-Y+:backup basename prefix:_files' \ '-z+:backup file suffix:(.bak)' \ '-g+:NUM:' \ diff --git a/Config/version.mk b/Config/version.mk index 3bdd89dc0..b1ff631b4 100644 --- a/Config/version.mk +++ b/Config/version.mk @@ -27,5 +27,5 @@ # This must also serve as a shell script, so do not add spaces around the # `=' signs. -VERSION=3.1.6-pws-3 +VERSION=3.1.6-pws-4 VERSION_DATE='September 6, 1999' diff --git a/Functions/Zftp/.distfiles b/Functions/Zftp/.distfiles index e5aad61ea..738b82f4c 100644 --- a/Functions/Zftp/.distfiles +++ b/Functions/Zftp/.distfiles @@ -1,7 +1,7 @@ DISTFILES_SRC=' .distfiles - zfanon zfautocheck zfcd zfcd_match zfcget zfclose zfcput zfdir - zfgcp zfget zfget_match zfgoto zfhere zfinit zfls zfmark zfopen zfparams - zfpcp zfput zfrglob zfrtime zfstat zftp_chpwd zftp_progress - zftype zfuget zfuput + zfanon zfautocheck zfcd zfcd_match zfcget zfclose zfcput zfdir zffcache + zfgcp zfget zfget_match zfgoto zfhere zfinit zfls zfmark zfopen + zfparams zfpcp zfput zfrglob zfrtime zfsession zfstat zftp_chpwd + zftp_progress zftransfer zftype zfuget zfuput ' diff --git a/Functions/Zle/.distfiles b/Functions/Zle/.distfiles index 429c133a0..b7ee01e1f 100644 --- a/Functions/Zle/.distfiles +++ b/Functions/Zle/.distfiles @@ -1,3 +1,4 @@ DISTFILES_SRC=' - .distfiles incremental-complete-word insert-files + .distfiles history-search-end incremental-complete-word insert-files + predict-on ' diff --git a/Functions/Zle/history-search-end b/Functions/Zle/history-search-end new file mode 100644 index 000000000..24e7a0a87 --- /dev/null +++ b/Functions/Zle/history-search-end @@ -0,0 +1,28 @@ +# function history-search-end { +# +# This implements functions like history-beginning-search-{back,for}ward, +# but takes the cursor to the end of the line after moving in the +# history, like history-search-{back,for}ward. To use them: +# zle -N history-beginning-search-backward-end history-search-end +# zle -N history-beginning-search-forward-end history-search-end +# bindkey '...' history-beginning-search-backward-end +# bindkey '...' history-beginning-search-forward-end + +integer ocursor=$CURSOR + +if [[ $LASTWIDGET = history-beginning-search-*-end ]]; then + # Last widget called set $hbs_pos. + CURSOR=$hbs_pos +else + hbs_pos=$CURSOR +fi + +if zle .${WIDGET%-end}; then + # success, go to end of line + zle .end-of-line +else + # failure, restore position + CURSOR=$ocursor + return 1 +fi +# } diff --git a/Functions/Zle/predict-on b/Functions/Zle/predict-on new file mode 100644 index 000000000..07ce0703a --- /dev/null +++ b/Functions/Zle/predict-on @@ -0,0 +1,64 @@ +# This set of functions implements a sort of magic history searching. +# After predict-on, typing characters causes the editor to look backward +# in the history for the first line beginning with what you have typed +# so far. After predict-off, editing returns to normal for the line found. +# In fact, you often don't even need to use predict-off, because if the +# line doesn't match something in the history, adding a key at the end +# behaves as normal --- though editing in the middle is liable to delete +# the rest of the line. +# +# To use it: +# autoload -U predict-on +# zle -N predict-on +# zle -N predict-off +# bindkey '...' predict-on +# bindkey '...' predict-off +# Note that all the functions are defined when you first call type the +# predict-on key, which means typing the predict-off key before that gives +# a harmless error message. + +predict-on() { + zle -N self-insert insert-and-predict + zle -N magic-space insert-and-predict + zle -N backward-delete-char delete-backward-and-predict +} +predict-off() { + zle -A .self-insert self-insert + zle -A .magic-space magic-space + zle -A .backward-delete-char backward-delete-char +} +insert-and-predict () { + emulate -L zsh + if [[ ${RBUFFER[1]} = ${KEYS[-1]} ]] + then + # same as what's typed, just move on + ((++CURSOR)) + else + LBUFFER="$LBUFFER$KEYS" + if [[ $LASTWIDGET == (self-insert|magic-space|backward-delete-char) ]] + then + zle .history-beginning-search-backward || RBUFFER="" + fi + fi + return 0 +} +delete-backward-and-predict() { + emulate -L zsh + if [[ -n "$LBUFFER" ]] + then + # If the last widget was e.g. a motion, then probably the intent is + # to actually edit the line, not change the search prefix. + if [[ $LASTWIDGET == (self-insert|magic-space|backward-delete-char) ]] + then + ((--CURSOR)) + zle .history-beginning-search-forward || RBUFFER="" + return 0 + else + # Depending on preference, you might call "predict-off" here, + # and also set up forward deletions to turn off prediction. + LBUFFER="$LBUFFER[1,-2]" + fi + fi +} + +[[ -o kshautoload ]] || predict-on "$@" diff --git a/Src/builtin.c b/Src/builtin.c index 9184fd719..7af09737d 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1064,7 +1064,7 @@ int fixdir(char *src) { char *dest = src, *d0 = dest; -#ifdef __CYGWIN +#ifdef __CYGWIN__ char *s0 = src; #endif int ret = 0; diff --git a/Src/subst.c b/Src/subst.c index 12e1cf351..48dac35e6 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -242,7 +242,7 @@ singsub(char **s) } /* Perform substitution on a single word. Unlike with singsub, the * - * result can have more than one words. A single word result is stored * + * result can have more than one word. A single word result is sorted * * in *s and *isarr is set to zero; otherwise *isarr is set to 1 and * * the result is stored in *a. If `a' is zero a multiple word result is * * joined using sep or the IFS parameter if sep is zero and the result * diff --git a/Src/zsh.export b/Src/zsh.export index e3d7bc567..92844d39d 100644 --- a/Src/zsh.export +++ b/Src/zsh.export @@ -201,6 +201,7 @@ realparamtab redup refreshptr remlpaths +remnode remnulargs removehashnode require_module |