@@ -41,11 +41,11 @@ def get_command(self, ctx, name):
4141@click .option ('--config-file' , metavar = '<FILE>' , help = 'Configuration file.' )
4242@click .option ('--profile' , metavar = '<PROFILE>' , help = 'Configuration profile.' )
4343@click .option ('--endpoint-url' , metavar = '<URL>' , help = 'API endpoint URL.' )
44- @click .option ('--output-format ' , metavar = '<FORMAT> ' , default = 'psql ' , help = 'Output format. eg. simple, grid, psql, presto, rst' )
44+ @click .option ('--output' , 'output ' , metavar = '<FORMAT> ' , help = 'Output format. eg. simple, grid, psql, presto, rst' )
4545@click .option ('--color/--no-color' , help = 'Color-coded output based on severity.' )
4646@click .option ('--debug' , is_flag = True , help = 'Debug mode.' )
4747@click .pass_context
48- def cli (ctx , config_file , profile , endpoint_url , output_format , color , debug ):
48+ def cli (ctx , config_file , profile , endpoint_url , output , color , debug ):
4949 """
5050 Alerta client unified command-line tool.
5151 """
@@ -54,6 +54,8 @@ def cli(ctx, config_file, profile, endpoint_url, output_format, color, debug):
5454
5555 ctx .obj = dict ()
5656 ctx .obj ['timezone' ] = config .options ['timezone' ]
57+ ctx .obj ['output' ] = output or config .options ['output' ]
58+ ctx .obj ['color' ] = color or config .options ['color' ]
5759
5860 endpoint = endpoint_url or config .options ['endpoint' ]
5961
0 commit comments