Listing Templates
cgardner opened this issue · comments
I discovered today that listing templates filters the templates using the current context. Is this how it should work?
I was expecting to see all templates regardless of tag or project.
Yes it is, context applies to everything except show-unorganised
and show-projects
. The latter for technical reasons only -- the filtering would be more complex so hasn't been implemented yet; using the standard filtering could yield a partial representation.
Do you think this needs to change?
I can see a case that could be made for either. Showing all templates would be nice where users may want to create a template based task that's outside of their current context. This would be most useful when the number of templates is small. On the other hand, if there are a lot of templates, it could be nice to have them contextual.
As I write this, I only have 6 templates, so personally I'd like to see all of them.
I think the principle of least surprise applies here. Commands generally have context applied. I think 3 extra characters for the command makes this ok though: dstask show-templates --
to list without context.
To be honest I'm still a bit on the fence so we'll keep the issue open. Really we need to review the motivation and reasoning for all commands if we change this -- not a bad idea, especially before 1.0.
That's fine by me. I can work around this as well.