Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--fmt should imply -t #374

Closed
simonw opened this issue Jan 9, 2022 · 4 comments
Closed

--fmt should imply -t #374

simonw opened this issue Jan 9, 2022 · 4 comments
Labels
Milestone

Comments

@simonw
Copy link
Owner

simonw commented Jan 9, 2022

Not sure why I didn't implement this.

@simonw simonw added the cli-tool label Jan 9, 2022
@simonw
Copy link
Owner Author

simonw commented Jan 9, 2022

Need to change if table: to if table or fmt: in a few places.

@simonw
Copy link
Owner Author

simonw commented Jan 9, 2022

Better:

if fmt:
    table = True

@simonw
Copy link
Owner Author

simonw commented Jan 9, 2022

Commands that support --fmt (via the @output_options decorator) are:

  • tables
  • views
  • query
  • memory
  • search
  • rows
  • triggers
  • indexes

@simonw
Copy link
Owner Author

simonw commented Jan 9, 2022

In addition to a unit test I manually tested all of the above, e.g.

% sqlite-utils indexes global-power-plants.db sqlite_master --fmt rst
=======  ============  =======  =====  ======  ======  ======  =====
table    index_name    seqno    cid    name    desc    coll    key
=======  ============  =======  =====  ======  ======  ======  =====
=======  ============  =======  =====  ======  ======  ======  =====

@simonw simonw closed this as completed in b8c1340 Jan 9, 2022
simonw added a commit that referenced this issue Jan 9, 2022
Should help tests pass for #374, #371
@simonw simonw added this to the 3.21 milestone Jan 10, 2022
simonw added a commit that referenced this issue Jan 11, 2022
simonw added a commit that referenced this issue Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant