[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69532: mv's new -x option should be made orthogonal to -t/-T/default
From: |
Bernhard Voelker |
Subject: |
bug#69532: mv's new -x option should be made orthogonal to -t/-T/default |
Date: |
Wed, 20 Mar 2024 20:43:40 +0100 |
User-agent: |
Mozilla Thunderbird |
On 3/17/24 07:10, Paul Eggert wrote:
Although removing that "mv --swap" implementation was a win, I don't
think we can simply delegate this to util-linux's exch command.
I still have some headache adding this.
This stems from the fact that although mv(1) is a userland frontend
for renameat(2), the user interface is different:
while renameat(2) deals exactly with 2 operands, mv(1) has always
been able to work on more arguments.
Now, extending "exchange" to more arguments is confusing and the
use is not intuitive:
mv -v --exchange a b c d
An "exchange" can literally only be applied to 2 files,
and 'exch' is IMO fine.
I have the gut feeling that we didn't think through all cases,
and that some might be surprising, e.g.:
$ mkdir d; echo 1 > a; echo 2 > d/a
$ src/mv --exchange a a a a d/a
versus
$ src/mv --exchange a a a a d/a
Have a nice day,
Berny
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, (continued)
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Dominique Martinet, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/04
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Dominique Martinet, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Karel Zak, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Masatake YAMATO, 2024/03/05
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/17
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/17
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Pádraig Brady, 2024/03/17
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default,
Bernhard Voelker <=
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Bernhard Voelker, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Bernhard Voelker, 2024/03/21
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Paul Eggert, 2024/03/22
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Bernhard Voelker, 2024/03/23
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Karel Zak, 2024/03/22
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Bernhard Voelker, 2024/03/23
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Rob Landley, 2024/03/20
- bug#69532: mv's new -x option should be made orthogonal to -t/-T/default, Rob Landley, 2024/03/05