Skip to content

-e mode ignores table_format from config #87

Description

@sirianni

Problem

The table_format setting under [main] in ~/.athenacli/athenaclirc is honored in the interactive REPL but silently ignored when running with -e.

Expected

-e should fall back to the configured table_format when --table-format is not passed on the command line.

Actual

-e always uses the --table-format CLI flag, whose default is csv, overwriting the configured value.

Root cause

In main.py:

@click.option('--table-format', type=str, default='csv', ...)
...
if execute:
    ...
    athenacli.formatter.format_name = table_format  # unconditional

The override happens whether or not the user passed --table-format. Changing the default to None and only overriding when non-None would fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions