Hrvoje Niksic wrote:

> > And how is .tar.gz renamed?  .tar-1.gz?
>
> Ouch.

OK. I'm responding to the chain and not Hrvoje's expression of pain. :-)

What if we changed the semantics of --no-clobber so the user could specify
the behavior? I'm thinking it could accept the following strings:
- after: append a number after the file name (current behavior)
- before: insert a number before the suffix
- new: change name of new file (current behavior)
- old: change name of old file

With this scheme --no-clobber becomes equivalent to --no-clobber=after,new.
If I want to change where the number appears in the file name or have the
old file renamed then I can specify the behavior I want on the command line
(or in .wgetrc). I think I would change my default to
--no-clobber=before,old.

I think it would be useful to have semantics in .wgetrc where I specify what
I want my --no-clobber default to be without that meaning I want
--no-clobber processing on each invocation. It would be nice if I could say
that I want my default to be "before,old", but to only have that apply when
I specify --no-clobber on the command line.

Back to the painful point at the start of this note, I think we treat
".tar.gz" as a suffix and if --no-clobber=before is specified, the file name
becomes ".1.tar.gz".

Tony

Reply via email to