summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/pkg18
-rw-r--r--man/1/pkg18
2 files changed, 17 insertions, 19 deletions
diff --git a/bin/pkg b/bin/pkg
index 4ec0499..c6ae12f 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -90,16 +90,16 @@ export PKG_ROOT
##
# commandline options override everything else
-while [[ $1 == [-+]* ]] {
+while [[ $1 == --* ]] {
case $1 in
- -q|--quiet) SILENT=1 ;;
- +q|--no-quiiet) SILENT=0 ;;
- -d|--debug) DEBUG=1 ;;
- +d|--no-debug) DEBUG=0 ;;
- -au|--auto-update) AUTOUPDATE=1 ;;
- +au|--no-auto-update) AUTOUPDATE=0 ;;
- -co|--checklinks-options) CL_OPTIONS+=$2; shift ;;
- -p|--packagedir) PDIR=$2; shift ;;
+ --quiet) SILENT=1 ;;
+ --no-quiiet) SILENT=0 ;;
+ --debug) DEBUG=1 ;;
+ --no-debug) DEBUG=0 ;;
+ --auto-update) AUTOUPDATE=1 ;;
+ --no-auto-update) AUTOUPDATE=0 ;;
+ --checklinks-options) CL_OPTIONS+=$2; shift ;;
+ --packagedir) PDIR=$2; shift ;;
*) die "Unknown argument: '$1'\n" ;;
esac
shift
diff --git a/man/1/pkg b/man/1/pkg
index 56e8dae..049ae72 100644
--- a/man/1/pkg
+++ b/man/1/pkg
@@ -92,33 +92,31 @@ If no argument is given, updates all installed packages
=head1 OPTIONS
-B<pkg> accepts both long and short options.
-Options marked as [boolean] may be negated,
-the short options by using '+' instead of '-' as prefix (like '+au'),
-the long options by prepending a 'no', like '--no-auto-update'.
+Options marked as [boolean] may be negated
+by prepending a 'no', like '--no-auto-update'.
-Options always override the configuration file and the environment variables.
+Options always override the configuration file.
=over
-=item B<-q>, B<--quiet> [boolean]
+=item B<--quiet> [boolean]
Enable quiet mode, don't print progress. Useful for scripting
-=item B<-d>, B<--debug> [boolean]
+=item B<--debug> [boolean]
Enable debug mode
-=item B<-au>, B<--auto-update> [boolean]
+=item B<--auto-update> [boolean]
Automatically update the package list before doing certain actions
-=item B<-co>, B<--checklinks-options> I<option>
+=item B<--checklinks-options> I<option>
Append I<option> to the options checklinks is invoked with.
Only one option is allowed. To append more options, repeat the argument
-=item B<-p>, B<--packagedir> I<directory>
+=item B<--packagedir> I<directory>
Use I<directory> as local package directory