`-e` mode ignores `table_format` from config
- Dominant language
- Python
- Stars
- 228
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
## 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`](https://github.com/dbcli/athenacli/blob/main/athenacli/main.py):
```python
@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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.