|
20 | 20 | from linodecli.configuration import _do_get_request |
21 | 21 | from linodecli.configuration.helpers import _default_text_input |
22 | 22 | from linodecli.exit_codes import ExitCodes |
| 23 | +from linodecli.help_formatter import SortingHelpFormatter |
23 | 24 | from linodecli.plugins import PluginContext, inherit_plugin_args |
24 | 25 | from linodecli.plugins.obj.buckets import create_bucket, delete_bucket |
25 | 26 | from linodecli.plugins.obj.config import ( |
@@ -68,7 +69,11 @@ def generate_url(get_client, args, **kwargs): # pylint: disable=unused-argument |
68 | 69 | """ |
69 | 70 | Generates a URL to an object |
70 | 71 | """ |
71 | | - parser = inherit_plugin_args(ArgumentParser(PLUGIN_BASE + " signurl")) |
| 72 | + parser = inherit_plugin_args( |
| 73 | + ArgumentParser( |
| 74 | + PLUGIN_BASE + " signurl", formatter_class=SortingHelpFormatter |
| 75 | + ) |
| 76 | + ) |
72 | 77 |
|
73 | 78 | parser.add_argument( |
74 | 79 | "bucket", |
@@ -119,7 +124,11 @@ def set_acl(get_client, args, **kwargs): # pylint: disable=unused-argument |
119 | 124 | """ |
120 | 125 | Modify Access Control List for a Bucket or Objects |
121 | 126 | """ |
122 | | - parser = inherit_plugin_args(ArgumentParser(PLUGIN_BASE + " setacl")) |
| 127 | + parser = inherit_plugin_args( |
| 128 | + ArgumentParser( |
| 129 | + PLUGIN_BASE + " setacl", formatter_class=SortingHelpFormatter |
| 130 | + ) |
| 131 | + ) |
123 | 132 |
|
124 | 133 | parser.add_argument( |
125 | 134 | "bucket", metavar="BUCKET", type=str, help="The bucket to modify." |
@@ -183,7 +192,11 @@ def show_usage(get_client, args, **kwargs): # pylint: disable=unused-argument |
183 | 192 | """ |
184 | 193 | Shows space used by all buckets in this cluster, and total space |
185 | 194 | """ |
186 | | - parser = inherit_plugin_args(ArgumentParser(PLUGIN_BASE + " du")) |
| 195 | + parser = inherit_plugin_args( |
| 196 | + ArgumentParser( |
| 197 | + PLUGIN_BASE + " du", formatter_class=SortingHelpFormatter |
| 198 | + ) |
| 199 | + ) |
187 | 200 |
|
188 | 201 | parser.add_argument( |
189 | 202 | "bucket", |
@@ -290,7 +303,11 @@ def get_obj_args_parser(): |
290 | 303 | """ |
291 | 304 | Initialize and return the argument parser for the obj plug-in. |
292 | 305 | """ |
293 | | - parser = inherit_plugin_args(ArgumentParser(PLUGIN_BASE, add_help=False)) |
| 306 | + parser = inherit_plugin_args( |
| 307 | + ArgumentParser( |
| 308 | + PLUGIN_BASE, add_help=False, formatter_class=SortingHelpFormatter |
| 309 | + ) |
| 310 | + ) |
294 | 311 |
|
295 | 312 | parser.add_argument( |
296 | 313 | "command", |
|
0 commit comments