Do you prefer this version?
On Wed, Dec 2, 2020 at 10:53 PM Denys Vlasenko <[email protected]>
wrote:
> Please use tabs.
>
> If you use "--strip-components NUM" instead of "NUMBER", it'll line up
> nicely for 3-tab columns.
>
> On Mon, Nov 30, 2020 at 7:05 PM Christophe Vidal
> <[email protected]> wrote:
> >
> > Hi,
> >
> > Here is a patch for tar that documents long options without a short
> option in --help
> >
> > Long options documented:
> > --overwrite
> > --lzma
> > --strip-components
> > --no-recursion
> > --to-command
> > --numeric-owner
> > --no-same-permissions
> >
> > Minor reformatting is also included for alignment purposes.
> >
> > Inspired by GNU tar, I am proposing not to exhaustively list all the
> supported long options in the usage line, and instead replace them by a
> generic [OPTIONS]... placeholder, but open to other suggestions on this.
> >
> > Thanks,
> > Chris
> > _______________________________________________
> > busybox mailing list
> > [email protected]
> > http://lists.busybox.net/mailman/listinfo/busybox
>
diff --git a/archival/tar.c b/archival/tar.c
index 93184cc2a..15fc4aef3 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -775,7 +775,7 @@ static llist_t *append_file_list_to_list(llist_t *list)
//usage: IF_FEATURE_TAR_NOPRESERVE_TIME("m")
//usage: "vokO] "
//usage: "[-f TARFILE] [-C DIR] "
-//usage: IF_FEATURE_TAR_FROM("[-T FILE] [-X FILE] "IF_FEATURE_TAR_LONG_OPTIONS("[--exclude PATTERN]... "))
+//usage: IF_FEATURE_TAR_FROM("[-T FILE] [-X FILE] "IF_FEATURE_TAR_LONG_OPTIONS("[OPTION]... "))
//usage: "[FILE]..."
//usage:#define tar_full_usage "\n\n"
//usage: IF_FEATURE_TAR_CREATE("Create, extract, ")
@@ -796,6 +796,9 @@ static llist_t *append_file_list_to_list(llist_t *list)
//usage: )
//usage: "\n -o Don't restore user:group"
///////:-p - accepted but ignored, restores mode (aliases in GNU tar: --preserve-permissions, --same-permissions)
+//usage: IF_FEATURE_TAR_LONG_OPTIONS(
+//usage: "\n --overwrite Replace existing files"
+//usage: )
//usage: "\n -k Don't replace existing files"
//usage: IF_FEATURE_SEAMLESS_Z(
//usage: "\n -Z (De)compress using compress"
@@ -809,6 +812,11 @@ static llist_t *append_file_list_to_list(llist_t *list)
//usage: IF_FEATURE_SEAMLESS_BZ2(
//usage: "\n -j (De)compress using bzip2"
//usage: )
+//usage: IF_FEATURE_SEAMLESS_LZMA(
+//usage: IF_FEATURE_TAR_LONG_OPTIONS(
+//usage: "\n --lzma (De)compress using lzma"
+//usage: )
+//usage: )
//usage: "\n -a (De)compress based on extension"
//usage: IF_FEATURE_TAR_CREATE(
//usage: "\n -h Follow symlinks"
@@ -820,21 +828,20 @@ static llist_t *append_file_list_to_list(llist_t *list)
//usage: "\n --exclude PATTERN Glob pattern to exclude"
//usage: )
//usage: )
+//usage: IF_FEATURE_TAR_LONG_OPTIONS(
+//usage: "\n --strip-components NUM NUM of leading components to strip"
+//usage: "\n --no-recursion Don't descend in directories"
+//usage: IF_FEATURE_TAR_TO_COMMAND(
+//usage: "\n --to-command COMMAND Pipe files to COMMAND"
+//usage: )
+//usage: "\n --numeric-owner Use numeric user:group"
+//usage: "\n --no-same-permissions Apply umask on permissions"
+//usage: )
//usage:
//usage:#define tar_example_usage
//usage: "$ zcat /tmp/tarball.tar.gz | tar -xf -\n"
//usage: "$ tar -cf /tmp/tarball.tar /usr/local\n"
-// Supported but aren't in --help:
-// lzma
-// no-recursion
-// numeric-owner
-// no-same-permissions
-// overwrite
-//IF_FEATURE_TAR_TO_COMMAND(
-// to-command
-//)
-
enum {
OPTBIT_KEEP_OLD = 8,
IF_FEATURE_TAR_CREATE( OPTBIT_CREATE ,)
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox