mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
'-f' must now always be specified as '--fmt', refs #194
This commit is contained in:
parent
afee15f04b
commit
309ae84336
3 changed files with 2 additions and 3 deletions
|
|
@ -162,7 +162,7 @@ You can use the ``--table`` option (or ``-t`` shortcut) to output query results
|
|||
1 4 Cleo
|
||||
2 2 Pancakes
|
||||
|
||||
You can use the ``--fmt`` (or ``-f``) option to specify different table formats, for example ``rst`` for reStructuredText::
|
||||
You can use the ``--fmt`` option to specify different table formats, for example ``rst`` for reStructuredText::
|
||||
|
||||
$ sqlite-utils dogs.db "select * from dogs" --table --fmt rst
|
||||
==== ===== ========
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ def output_options(fn):
|
|||
click.option("--no-headers", is_flag=True, help="Omit CSV headers"),
|
||||
click.option("-t", "--table", is_flag=True, help="Output as a table"),
|
||||
click.option(
|
||||
"-f",
|
||||
"--fmt",
|
||||
help="Table format - one of {}".format(
|
||||
", ".join(tabulate.tabulate_formats)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ def test_output_table(db_path, fmt, expected):
|
|||
for i in range(4)
|
||||
]
|
||||
)
|
||||
result = CliRunner().invoke(cli.cli, ["rows", db_path, "rows", "-t", "-f", fmt])
|
||||
result = CliRunner().invoke(cli.cli, ["rows", db_path, "rows", "-t", "--fmt", fmt])
|
||||
assert 0 == result.exit_code
|
||||
assert expected == result.output.strip()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue