[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -i interactive command not working

From: Jim Meyering
Subject: Re: -i interactive command not working
Date: Fri, 09 Jan 2004 09:07:25 +0100

"Alfred M. Szmidt" <address@hidden> wrote:
>>From (coreutils) cp invocation:
>   `-i'
>   `--interactive'
>        Prompt whether to overwrite existing regular destination files.
> And (coreutils) mv invocation:
>   `-i'
>   `--interactive'
>        Prompt whether to overwrite each existing destination file,
>        regardless of its permissions.  If the response does not begin
>        with `y' or `Y', the file is skipped.
> Jim, what do you think about converting all option text into macros so
> that they will stay in sync and ease a bit of a maintaining nightmare?
> So instead of duplicating all the text each time one wants to show the
> `--interactive' option, you would just have:

Thanks for the suggestion.
I like the idea, in general.
Unfortunately, the --interactive (-i) option has sufficiently
different semantics in cp and mv that it shouldn't be used here.
I.e., given an unwritable destination file, cp fails, but mv prompts.
Hence the clause about permissions is only in mv's -i description.

  $ rm -rf a b; touch a b; chmod 0 b
  $ cp a b
  cp: cannot create regular file `b': Permission denied
  [Exit 1]
  $ mv a b
  mv: overwrite `b', overriding mode 0000? n

But I'm sure there are plenty of other duplicate descriptions
that _should_ be factored.  Any such patch would be very welcome.

Also, note that mv's -i cancels the effect of any preceding -f option,
while cp's -i and -f are not related.

> @macro opt_interactive

btw, TeX macro names can't contain `_'.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]