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

Add list templates #67

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

probably-neb
Copy link
Contributor

@probably-neb probably-neb commented Nov 1, 2022

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
Copy link

devhell commented Dec 11, 2022

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

Copy link
Owner

@Misterio77 Misterio77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome and fits perfectly.

Thanks a lot, and sorry for the wait!

@Misterio77
Copy link
Owner

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

@Misterio77 Misterio77 merged commit 58bc23e into Misterio77:master May 2, 2023
1 check passed
@devhell
Copy link

devhell commented May 2, 2023

Thank you very much @probably-neb and @Misterio77 🍻 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants