diff --git a/doc/patool.1 b/doc/patool.1 index ed9fceb..f578326 100644 --- a/doc/patool.1 +++ b/doc/patool.1 @@ -46,7 +46,7 @@ first extracting files to a unique (temporary) directory, and then moving its contents back if possible. This also prevents local files from being overwritten by mistake. .TP -\fB\-\-verbose\fP +\fB\-v\fP, \fB\-\-verbose\fP Be verbose when extracting (if the helper application supports it). .TP \fB\-\-help\fP @@ -54,7 +54,7 @@ Show help for this command. .SS \fBlist\fP List files in an archive. .TP -\fB\-\-verbose\fP +\fB\-v\fP, \fB\-\-verbose\fP Verbose archive listing (if the helper application supports it). .TP \fB\-\-help\fP @@ -62,7 +62,7 @@ Show help for this command. .SS \fBcreate\fP Create an archive from given files. .\" .TP -.\" \fB\-\-verbose\fP +.\" \fB\-v\fP, \fB\-\-verbose\fP .\" Verbose operation (if the helper application supports it). .TP \fB\-\-help\fP @@ -70,7 +70,7 @@ Show help for this command. .SS \fBtest\fP Test files in an archive. .TP -\fB\-\-verbose\fP +\fB\-v\fP, \fB\-\-verbose\fP Verbose archive testing (if the helper application supports it). .TP \fB\-\-help\fP diff --git a/doc/patool.txt b/doc/patool.txt index 0b59db0..d28db65 100644 --- a/doc/patool.txt +++ b/doc/patool.txt @@ -37,7 +37,7 @@ COMMANDS contents back if possible. This also prevents local files from being overwritten by mistake. - --verbose + -v, --verbose Be verbose when extracting (if the helper application supports it). @@ -46,7 +46,7 @@ COMMANDS list List files in an archive. - --verbose + -v, --verbose Verbose archive listing (if the helper application supports it). --help Show help for this command. @@ -59,7 +59,7 @@ COMMANDS test Test files in an archive. - --verbose + -v, --verbose Verbose archive testing (if the helper application supports it). --help Show help for this command. diff --git a/doc/todo.txt b/doc/todo.txt index c4d958e..67711b8 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -1,2 +1 @@ - Add ability to extract multiple archives. -- Add short option -v for verbosity. diff --git a/patool b/patool index d0aad5a..09c2f67 100755 --- a/patool +++ b/patool @@ -22,7 +22,7 @@ if not hasattr(sys, "version_info") or sys.version_info < (2, 4, 0, "final", 0): raise SystemExit("This program requires Python 2.4 or later.") from patoolib import handle_archive, list_formats, baker -@baker.command(default=True, params={ +@baker.command(default=True, shortopts={"verbose": "v"}, params={ "verbose": "Be verbose when extracting (if the helper application supports it)." }) def extract (archive, verbose=False): @@ -30,7 +30,7 @@ def extract (archive, verbose=False): return handle_archive(archive, 'extract') -@baker.command(params={ +@baker.command(shortopts={"verbose": "v"}, params={ "verbose": "Verbose archive listing (if the helper application supports it).", }) def list (archive, verbose=False): @@ -44,7 +44,7 @@ def create (archive, *args): return handle_archive(archive, 'create', *args) -@baker.command(params={ +@baker.command(shortopts={"verbose": "v"}, params={ "verbose": "Verbose operation (if the helper application supports it).", }) def test (archive, verbose=False):