On Sat, Mar 30, 2019 at 08:15:11AM -0000, Christian Weisgerber wrote:
> Oops, I guess I should document --del.
> 

hi.

i'm ok with this, but i wonder if it's the best way to do it? this way,
neither usage() or SYNOPSIS provide a hint that --del and --delete are
the same. and the size of both is increasing.

we could use: [--del[ete]]
that looks ugly, but is short and clear. kind of vi(1) style.

we could just note in the description of --delete that it can be
abbreviated to --del. that would add the least amount of text, but not
show up in usage/synopsis.

what do you think?
jmc

> Index: main.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/rsync/main.c,v
> retrieving revision 1.37
> diff -u -p -r1.37 main.c
> --- main.c    30 Mar 2019 07:24:42 -0000      1.37
> +++ main.c    30 Mar 2019 08:12:12 -0000
> @@ -499,7 +499,7 @@ main(int argc, char *argv[])
>  usage:
>       fprintf(stderr,
>           "usage: %s [-aDglnoprtvz] [-e program] [--archive] [--compress]\n"
> -         "\t[--delete] [--devices] [--group] [--links] [--dry-run]\n"
> +         "\t[--del] [--delete] [--devices] [--group] [--links] [--dry-run]\n"
>           "\t[--owner] [--perms] [--port=portnumber] [--recursive]\n"
>           "\t[--rsh=program][--rsync-path=program] [--specials] [--times]\n"
>           "\t[--verbose] [--version] source ... directory\n",
> Index: rsync.1
> ===================================================================
> RCS file: /cvs/src/usr.bin/rsync/rsync.1,v
> retrieving revision 1.12
> diff -u -p -r1.12 rsync.1
> --- rsync.1   22 Mar 2019 20:12:23 -0000      1.12
> +++ rsync.1   30 Mar 2019 08:05:07 -0000
> @@ -25,6 +25,7 @@
>  .Op Fl aDglnoprtv
>  .Op Fl e Ar program
>  .Op Fl -archive
> +.Op Fl -del
>  .Op Fl -delete
>  .Op Fl -devices
>  .Op Fl -group
> @@ -66,7 +67,7 @@ Shorthand for
>  Transfer device and special files.
>  Shorthand for
>  .Fl -devices -specials
> -.It Fl -delete
> +.It Fl -del , -delete
>  Delete files in
>  .Ar directory
>  not found in
> 
> -- 
> Christian "naddy" Weisgerber                          [email protected]
> 

Reply via email to