changeset 801:8167b2a8b4fe

fports: Change option characters "-A" -> "-n" and "-M" -> "-m"
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 02 Nov 2024 16:28:55 +0100
parents 1c4d729963dc
children 31ff8e5efdd6
files docs/man/man8/fports.rst sbin/fports
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/docs/man/man8/fports.rst	Fri Nov 01 02:20:56 2024 +0100
+++ b/docs/man/man8/fports.rst	Sat Nov 02 16:28:55 2024 +0100
@@ -15,9 +15,9 @@
 
 **fports deptree** [**-l** `maxlevel`] [**-r**] [**t**] `package` ...
 
-**fports detail -A**
+**fports detail -n**
 
-**fports detail -M**
+**fports detail -m**
 
 **fports detail** `package` ...
 
@@ -75,9 +75,9 @@
      that depend on a given `package`.
 
 
-**fports detail -A**
+**fports detail -n**
 
-**fports detail -M**
+**fports detail -m**
 
 **fports detail** `package` ...
 
@@ -92,11 +92,11 @@
 
   .. program:: fports deptree
 
-  .. option:: -A
+  .. option:: -n
 
      Automatically select all packages that are *not* installed automatically.
 
-  .. option:: -M
+  .. option:: -m
 
      Automatically select all packages that have a package mapping entry
      in :file:`package-mapping.conf`. See :manpage:`package-mapping.conf(5)`.
--- a/sbin/fports	Fri Nov 01 02:20:56 2024 +0100
+++ b/sbin/fports	Sat Nov 02 16:28:55 2024 +0100
@@ -24,8 +24,8 @@
 USAGE: fports -h
        fports -V
        fports deptree [-l maxlevel] [-r] [-t] package...
-       fports detail -A
-       fports detail -M
+       fports detail -n
+       fports detail -m
        fports detail package...
 
 GLOBAL OPTIONS:
@@ -355,12 +355,12 @@
 
     opt_noauto=no
     opt_mapped=no
-    while getopts "AM" opt; do
+    while getopts "nm" opt; do
         case "${opt}" in
-            A)
+            n)
                 # shellcheck disable=SC2034     # appears unused
                 opt_noauto=yes;;
-            M)
+            m)
                 # shellcheck disable=SC2034     # appears unused
                 opt_mapped=yes;;
             \?)
@@ -373,9 +373,9 @@
     OPTIND=1
 
     if checkyesno opt_noauto || checkyesno opt_mapped; then
-        [ $# -gt 0 ] && fatal "${EX_USAGE}" "packages are now allowed for options -A or -M"
+        [ $# -gt 0 ] && fatal "${EX_USAGE}" "packages are now allowed for options -n or -m"
         if checkyesno opt_noauto && checkyesno opt_mapped; then
-            fatal "${EX_USAGE}" "cannot use -A and -M together"
+            fatal "${EX_USAGE}" "cannot use -n and -m together"
         fi
     fi