On Wed, 24 Mar 2010, Vincent Lefevre wrote:

> On 2010-03-24 09:30:38 +1100, Tim Connors wrote:
> > The *correct* fix for #513379 would be to fix the manpage to say e.g.:
> >
> > usage:  crontab [ -u user ] [ -i ] [<file> | { -l | -r | -e }]
>
> Yes, but IMHO, in such a case, -i should prompt the user whenever
> there is an immediate destructive effect, i.e. with <file> and with -r
> (with -e, the user should see what he modifies, so that I don't think
> this is necessary). This would be more consistent. Note that just like
> "crontab -r", the user could type "crontab -" by mistake.

Yeah, but 'crontab -' is abortable, and 'crontab <file>' is not a typo.
crontab -r is the only one that is immediately in need of protecting by
crontab -i.  But this only works if 'crontab -i' with any other flag
doesn't abort with an error, which then precludes '-i' from being in a
user's alias.

You are correct that crontab -i with -e would be seriouly annoying.

> Also, I think that the user should be prompted only when the user
> already has a crontab. Currently, "crontab -r -i" prompts the user
> is any case.

Yep.  Just like 'rm -i' and 'cp -i'.

-- 
Tim Connors                      |  ✉ Anglo-Australian Observatory
  ➥ http://site.aao.gov.au/twc   |    Coonabarabran, NSW 2357, Australia
 ❨✸ Telescope Operator/Sysadmin  |  ☎ +61 2 6842 6286



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to