Misterio77 / flavours

🎨💧 An easy to use base16 scheme manager that integrates with any workflow.
MIT License
501 stars 29 forks source link

Add list templates #67

Closed probably-neb closed 1 year ago

probably-neb commented 1 year ago

Adds the ability to list templates (enhancement #35 ) using a flag with tthe existing flavours list command. example usage is shown below

❱ flavours list --templates
alacritty amfora binary-ninja blink ...

globbing still works, and -t works as short for --templates as you'd expect

❱ flavours list -t "i3*"
i3 i3status i3status-rust

including the '/templates/' (or just '/' as shown later) lists subtemplates

❱ flavours list -t "i3*/templates/*"
i3/bar-colors i3/client-properties i3/colors i3/default i3/nebi3 i3status-rust/default i3status/default

note adding the .mustache extension to the end of the glob will produce the same output and is therefore optional also note that the intermediary '/templates/' is NOT included in the output. This was done on purpose to make it easier to read, however I can imagine it causing some confusion because the output doesn't represent the actual file structure. I'm happy to figure out a different solution if this is a concern

To make it easier I made it so globs with a single '/' have the slash expanded to '/templates/' .

❱ flavours list -t "i3*/*"
i3/bar-colors i3/client-properties i3/colors i3/default i3/nebi3 i3status-rust/default i3status/default
devhell commented 1 year ago

OMG, @probably-neb this is amazing! Thank you! :beers:

Misterio77 commented 1 year ago

Merging now, thanks again! (Pushed to fix some conflicts)

devhell commented 1 year ago

Thank you very much @probably-neb and @Misterio77 :beers: :smile: