Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: prompt fun
- X-seq: zsh-workers 8214
- From: Bart Schaefer <schaefer@xxxxxxxxxxx>
- To: Adam Spiers <adam@xxxxxxxxxx>
- Subject: Re: PATCH: prompt fun
- Date: Mon, 11 Oct 1999 15:47:11 -0700 (PDT)
- Cc: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- In-reply-to: <19991011223022.A23117@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
On Mon, 11 Oct 1999, Adam Spiers wrote:
> Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> >
> > Run the "cvs diff" output through this:
> >
> > sed -e '/^RCS/,/^---/d' -e '/^\+\+\+/d'
>
> What if a line within the hunk begins with `--' or `++' though?
Removed lines beginning with "--" shouldn't be a problem, as there won't
be more than one line beginning with "RCS" for any file, and there must be
a line beginning with "---" above all hunks for each file in either diff
format.
Added lines beginning with "++" would cause patch to fail with a warning
about a malformed diff. I think that's probably a pretty rare occurrence
(since we're almost exclusively patching shell script and C source), but
you could make the pattern more detailed if you're concerned:
-e '/^\+\+\+ .* [0-9]+:[0-9]+:[0-9]+/d'
That forces there to be a space after the "+++" and something that looks
like a time on the line as well. Get as precise as you like ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author