deluser: add optional support for removing users from groups
[oweals/busybox.git] / include / usage.h
index fe4cd903cd126dc616c79d111e9a8fe5f577053a..afcc4b3d794e36595586a80724e26a6d8f7f2878 100644 (file)
        "Deallocate unused virtual terminal /dev/ttyN"
 
 #define delgroup_trivial_usage \
-       "GROUP"
+        USE_FEATURE_DEL_USER_FROM_GROUP("[USER] ")"GROUP"
 #define delgroup_full_usage \
-       "Delete group GROUP from the system"
+       "Delete group GROUP from the system" \
+        USE_FEATURE_DEL_USER_FROM_GROUP(" or user USER from group GROUP")
 
 #define deluser_trivial_usage \
        "USER"
        ) USE_FEATURE_FIND_EXEC( \
        "\n     -exec CMD       Execute CMD with all instances of {} replaced by the" \
        "\n                     files matching EXPRESSION" \
+        ) USE_FEATURE_FIND_USER( \
+       "\n     -user NAME      File is owned by user NAME (numeric user ID allowed)" \
+       ) USE_FEATURE_FIND_GROUP( \
+       "\n     -group NAME     File belongs to group NAME (numeric group ID allowed)" \
+       ) USE_FEATURE_FIND_DEPTH( \
+       "\n     -depth          Process directory after traversing it" \
        ) USE_FEATURE_FIND_SIZE( \
        "\n     -size N         File size is N" \
        ) USE_FEATURE_FIND_PRUNE( \
        "\n     -prune          Stop traversing current subtree" \
+        ) USE_FEATURE_FIND_DELETE( \
+       "\n     -delete         Delete files; Turns on -depth option" \
+        ) USE_FEATURE_FIND_PATH( \
+       "\n     -path           Path matches PATTERN" \
        ) USE_FEATURE_FIND_PAREN( \
-       "\n     (expr)          Group" \
+       "\n     (EXPR)          Group an expression" \
        )
 
 #define find_example_usage \
        USE_SELINUX( \
        "\n     -Z      Set security context of copy" \
        )
-
+/* would need to make the " | " optional depending on more than one selected */
 #define ip_trivial_usage \
-       "[OPTIONS] {address | link | route | tunnel | rule} {COMMAND}"
+       "[OPTIONS] {" \
+       USE_FEATURE_IP_ADDRESS("address | ") \
+       USE_FEATURE_IP_ROUTE("route | ") \
+       USE_FEATURE_IP_LINK("link | ") \
+       USE_FEATURE_IP_TUNNEL("tunnel | ") \
+       USE_FEATURE_IP_RULE("rule") \
+       "} {COMMAND}"
 #define ip_full_usage \
        "ip [OPTIONS] OBJECT {COMMAND}\n" \
-       "where  OBJECT := {link | addr | route | tunnel |rule}\n" \
+       "where  OBJECT := {" \
+       USE_FEATURE_IP_ADDRESS("address | ") \
+       USE_FEATURE_IP_ROUTE("route | ") \
+       USE_FEATURE_IP_LINK("link | ") \
+       USE_FEATURE_IP_TUNNEL("tunnel | ") \
+       USE_FEATURE_IP_RULE("rule") \
+       "}\n" \
        "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }"
 
 #define ipaddr_trivial_usage \