1212
1313from linodecli import plugins
1414from linodecli .helpers import (
15- pagination_args_shared ,
1615 register_args_shared ,
1716 register_debug_arg ,
17+ register_pagination_args_shared ,
1818)
19+ from linodecli .output .helpers import register_output_args_shared
1920
2021
2122def register_args (parser ):
@@ -41,106 +42,29 @@ def register_args(parser):
4142 action = "store_true" ,
4243 help = "Display information about a command, action, or the CLI overall." ,
4344 )
44- parser .add_argument (
45- "--text" ,
46- action = "store_true" ,
47- help = "Display text output with a delimiter (defaults to tabs)." ,
48- )
49- parser .add_argument (
50- "--delimiter" ,
51- metavar = "DELIMITER" ,
52- type = str ,
53- help = "The delimiter when displaying raw output." ,
54- )
55- parser .add_argument (
56- "--json" , action = "store_true" , help = "Display output as JSON."
57- )
58- parser .add_argument (
59- "--markdown" ,
60- action = "store_true" ,
61- help = "Display output in Markdown format." ,
62- )
63- parser .add_argument (
64- "--ascii-table" ,
65- action = "store_true" ,
66- help = "Display output in an ASCII table." ,
67- )
68- parser .add_argument (
69- "--pretty" ,
70- action = "store_true" ,
71- help = "If set, pretty-print JSON output." ,
72- )
73- parser .add_argument (
74- "--no-headers" ,
75- action = "store_true" ,
76- help = "If set, does not display headers in output." ,
77- )
78- parser .add_argument (
79- "--all" ,
80- action = "store_true" ,
81- help = (
82- "Deprecated flag. An alias of '--all-columns', "
83- "scheduled to be removed in a future version."
84- ),
85- )
86- parser .add_argument (
87- "--all-columns" ,
88- action = "store_true" ,
89- help = (
90- "If set, displays all possible columns instead of "
91- "the default columns. This may not work well on some terminals."
92- ),
93- )
94- parser .add_argument (
95- "--format" ,
96- metavar = "FORMAT" ,
97- type = str ,
98- help = "The columns to display in output. Provide a comma-"
99- "separated list of column names." ,
100- )
45+
10146 parser .add_argument (
10247 "--no-defaults" ,
10348 action = "store_true" ,
10449 help = "Suppress default values for arguments. Default values "
10550 "are configured on initial setup or with linode-cli configure" ,
10651 )
107- parser .add_argument (
108- "--no-truncation" ,
109- action = "store_true" ,
110- default = False ,
111- help = "Prevent the truncation of long values in command outputs." ,
112- )
52+
11353 parser .add_argument (
11454 "--no-retry" ,
11555 action = "store_true" ,
11656 help = "Skip retrying on common errors like timeouts." ,
11757 )
118- parser .add_argument (
119- "--single-table" ,
120- action = "store_true" ,
121- help = "Disable printing multiple tables for complex API responses." ,
122- )
123- parser .add_argument (
124- "--table" ,
125- type = str ,
126- action = "append" ,
127- help = "The specific table(s) to print in output of a command." ,
128- )
129- parser .add_argument (
130- "--column-width" ,
131- type = int ,
132- default = None ,
133- help = "Sets the maximum width of each column in outputted tables. "
134- "By default, columns are dynamically sized to fit the terminal." ,
135- )
58+
13659 parser .add_argument (
13760 "--version" ,
13861 "-v" ,
13962 action = "store_true" ,
14063 help = "Prints version information and exits." ,
14164 )
14265
143- pagination_args_shared (parser )
66+ register_output_args_shared (parser )
67+ register_pagination_args_shared (parser )
14468 register_args_shared (parser )
14569 register_debug_arg (parser )
14670
0 commit comments