Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#394577: zsh-beta: Completion of date does not work
- X-seq: zsh-workers 23303
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Bug#394577: zsh-beta: Completion of date does not work
- Date: Sat, 21 Apr 2007 01:08:37 -0400
- Cc: zsh-workers@xxxxxxxxxx, Jörg Sommer <joerg@xxxxxxxxxxxx>, 394577@xxxxxxxxxxxxxxx
- In-reply-to: <7805.1176802283@dcle12>
- Mail-followup-to: Oliver Kiddle <okiddle@xxxxxxxxxxx>, zsh-workers@xxxxxxxxxx, Jörg Sommer <joerg@xxxxxxxxxxxx>, 394577@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20061021222237.GA15881@xxxxxxxxxxxx> <20070414200015.GA10600@xxxxxxxxxxx> <7805.1176802283@dcle12>
> This is what _guard is for. Use something like:
> ': :_guard "^--*" format or date'
Okay.
Index: Completion/Unix/Command/_date
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_date,v
retrieving revision 1.5
diff -u -r1.5 _date
--- Completion/Unix/Command/_date 14 Apr 2007 20:04:07 -0000 1.5
+++ Completion/Unix/Command/_date 21 Apr 2007 05:07:38 -0000
@@ -43,6 +43,6 @@
fi
_arguments \
- "$args[@]" \
'-u[display or set time in UTC]' \
- ':format or date'
+ ': :_guard "^--*" "format or date"' \
+ "$args[@]"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author