We should implement a inheritance template model
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Quickly |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently all commands from any template can be launched in any templated project.
For instance, from an ubuntu-project templated project, I can launch:
quickly -t myawesometemplate foo
But how to I know that the "foo" commands is compatible with my ubuntu-project project?
The idea will be to add a confirmation dialog.
Also, we maybe want to add commands from others templates in our own template. The user hasn't to be aware that a particular command is from another template
To avoid this confirmation, we can introduce a --force command or enabling templates to tell "well, I know that the foo command from myawesometemplate is compatible with my template".
But in any case, that would mean the all commands in myawesometemplate is compatible with ubuntu-project template, only the foo command is.
Well, we can implement something like this in commandsconfig file: (taking for instance, the one of ubuntu-project template)
foo-template commandsconfig file:
COMMANDS_
COMMANDS_
COMMANDS_
# Below, you can specify whith which template and commands your template is compatibles
# [TEMPLATE] is the template name on which command will be described
# IMPORT means that this command from that template will be proposed in tab completion, and can be launched as a native template command (which means that --template is not compulsory)
# SUITED remove the warning when we launch that particular command from this template
[MYAWESOMETEMPLATE]
IMPORT=foo
SUITED=bar;share
[ANOTHERTEMPLATE]
IMPORT=pool
SUITED=swim
That will mean that the foo command from MYAWESOMETEMPLATE and pool command from ANOTHERTEMPLATE are considered as being "native" in this template (foo-template in that case). Those commands will be shown in shell completion and can be launched without --template option.
bar;share and swim are only considered as being compatible with foo-template templated projects. So, no confirmation prompt for those commands will be shown.
We can even imagine that some templates can only pick commands from other templates without defining one!
We should also consider that if the foo command is redefined in ubuntu-project template, we shouldn't be overridden by the foo command from myawesometemplate.
-> Quickly support also the "all" keyname to import all commands from a template
SUITED is not yet implemented as the warning is still not in effet
summary: |
- We should implement a inheritance template modele + We should implement a inheritance template model |
Changed in quickly: | |
status: | New → Triaged |
description: | updated |
description: | updated |
Changed in quickly: | |
status: | Triaged → Fix Committed |
milestone: | none → 0.4 |
Changed in quickly: | |
status: | Fix Committed → Fix Released |