Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Allow for duplicate supported file-types #9

Closed
sum01 opened this issue Nov 15, 2017 · 0 comments
Closed

Allow for duplicate supported file-types #9

sum01 opened this issue Nov 15, 2017 · 0 comments
Assignees
Milestone

Comments

@sum01
Copy link
Owner

sum01 commented Nov 15, 2017

Allow for duplicate file-types in fmt_table by not assigning the key like fmt_table["filetype"] = "value" but instead using table.insert(fmt_table, values). Reading the table will require nested loops, as doing this will mean we will have a potentially "table in a table in a table" as a worse-case scenario.

Reasoning: Some people might prefer one formatter over another, so this will allow conflicting formatters to exist in the same table, and also allow us to worry less over potential conflicts

@sum01 sum01 added this to the v2.0.0 milestone Nov 15, 2017
@sum01 sum01 self-assigned this Nov 15, 2017
sum01 added a commit that referenced this issue Nov 16, 2017
Fixes #8 and fixes #9

By not using the filetype as the key, we can have duplicate supported filetypes. This makes adding new formatters as painless as possible.
I've also completely revamped the list command to show as a table in the log, with the current on/off status.

PS: the 'fmt' command now runs the formatter, and 'fmt list' is to show the available formatters.
@sum01 sum01 closed this as completed in b9cac42 Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant