From 2d241d0ff9f26f75d5923d896bd30c61b189b099 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 13 Nov 2003 15:51:23 +0000 Subject: merge changes from 4.1 --- ChangeLog | 12 ++++++++++++ Completion/Unix/Command/.distfiles | 2 +- Completion/Unix/Command/_cvs | 4 ++-- Completion/Unix/Command/_nice | 14 ++++++++++++++ Completion/Zsh/Command/_precommand | 6 ++++++ 5 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 Completion/Unix/Command/_nice create mode 100644 Completion/Zsh/Command/_precommand diff --git a/ChangeLog b/ChangeLog index 0cf1bb3ad..65d042be2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -192,6 +192,11 @@ * 18841: Completion/Base/Completer/_prefix: work around problem where the unambiguous part is empty making the word be removed +2003-07-09 Peter Stephenson + + * 18839, modified c.f. 18840: Completion/Unix/Command/_nice, + Completion/Zsh/Command/_precommand: Completion for nice. + 2003-07-07 Oliver Kiddle * 18822: Completion/Base/Completer/_expand @@ -216,6 +221,13 @@ Completion/Linux/Command/_pkgtool: Completion for Slackware package management tool. +2003-07-03 Peter Stephenson + + * 18796: Completion/Unix/Command/_cvs: quoting of characters + when completing existing CVS-managed files (in particular + spaces) was flakey. The same problem probably exists for + completing modified files, but the code is indecipherable. + 2003-07-02 Oliver Kiddle * 18520, 13691 (Mario Lang), 13701 (Sven): diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index fa947708f..5c99e85d4 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -20,5 +20,5 @@ _chkconfig _cdcd _irssi _sccs _texinfo _ant _global _figlet _ifconfig _last _larch _lsof _mt _xmlsoft _elinks _tidy _python _antiword _renice _sablotron _cdrecord _aap _du -_rar _vorbis _subversion _screen +_rar _vorbis _subversion _screen _nice ' diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs index 7ab72d341..ec047c38a 100644 --- a/Completion/Unix/Command/_cvs +++ b/Completion/Unix/Command/_cvs @@ -856,8 +856,8 @@ _cvs_existing_entries() { linedir="$match[1]" realdir=${(e)~linedir} [[ -f "$realdir"CVS/Entries ]] && - [[ -n ${pat::="${(@j:|:)${(@)${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH}}"} ]] && - _wanted files expl file _path_files -g "$pat" + pat=(${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}%%/*}) + (( ${#pat} )) && _wanted files expl file _path_files -a pat } (( $+functions[_cvs_modified_entries] )) || diff --git a/Completion/Unix/Command/_nice b/Completion/Unix/Command/_nice new file mode 100644 index 000000000..f2f688368 --- /dev/null +++ b/Completion/Unix/Command/_nice @@ -0,0 +1,14 @@ +#compdef nice + +shift words +(( CURRENT-- )) + +if [[ $CURRENT -gt 1 && $words[1] = [-+](-|)<-> ]]; then + shift words + (( CURRENT -- )) +elif [[ $CURRENT -gt 2 && $words[1] = -n ]]; then + shift 2 words + (( CURRENT -= 2 )) +fi + +_normal diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand new file mode 100644 index 000000000..e48094721 --- /dev/null +++ b/Completion/Zsh/Command/_precommand @@ -0,0 +1,6 @@ +#compdef - nohup eval time rusage noglob nocorrect exec + +shift words +(( CURRENT-- )) + +_normal -- cgit 1.4.1