1 |
On Sat, 14 Apr 2018 17:25:36 -0700 |
2 |
Ian Zimmerman <itz@××××××××××××.org> wrote: |
3 |
>On 2018-04-15 00:10, Floyd Anderson wrote: |
4 |
> |
5 |
>> > https://very.loosely.org/paste/symlinks-pl |
6 |
> |
7 |
>> Because argument ROOTDIR is mandatory, the script should do something |
8 |
>> when ROOTDIR is not given, e.g. print usage. Maybe ‘-r’ should be also |
9 |
>> mandatory or the script should define some useful defaults. Consider |
10 |
>> following invocations: |
11 |
>> |
12 |
>> $ ./symlinks-pl |
13 |
>> $ ./symlinks-pl /path/to/broken-symlink |
14 |
>> $ ./symlinks-pl -r /path/to/broken-symlink |
15 |
>> |
16 |
>> which do nothing and results with exit code 0. |
17 |
> |
18 |
>I think this is more of a documentation bug in usage(). ROOTDIR is in |
19 |
>fact not mandatory - a list of zero or more items is expected, and each |
20 |
>item processed in turn. I remember thinking about it for a second, and |
21 |
>this was the most consistent and regular behavior, so the most |
22 |
>attractive to my droid mind :-P |
23 |
|
24 |
Then, I think, ROOTDIR in synopsis of `symlinks-pl --help` should be: |
25 |
|
26 |
symlinks-pl [OPTION ...] [ROOTDIR ...] |
27 |
|
28 |
like OPTION instead of: |
29 |
|
30 |
symlinks-pl [OPTION ...] ROOTDIR ... |
31 |
|
32 |
to be more consistent to other command line tools. But I see your point |
33 |
and forget to say thanks for sharing. ;-) |
34 |
|
35 |
|
36 |
-- |
37 |
Regards, |
38 |
floyd |