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 command (choco template) to retrieve information about currently installed package templates #449

Closed
aronovgj opened this issue Oct 3, 2015 · 2 comments · Fixed by #2385
Assignees
Labels
5 - Released Improvement IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen Priority_LOW
Milestone

Comments

@aronovgj
Copy link

aronovgj commented Oct 3, 2015

If you created custom templates you might later want to find out what you named them.

Something like choco new -list?

@ferventcoder ferventcoder added this to the 0.9.10.x milestone Oct 3, 2015
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Oct 1, 2021
Adds "-l"/"--list" switch to choco new.
This lists the custom templates that are installed in the templates
directory. This is accomplished by simply getting a list of the
sub-directories under the template directory and printing it out.
Also prints out the number of directories found.
@TheCakeIsNaOH
Copy link
Member

TheCakeIsNaOH commented Oct 8, 2021

I'm not sure this would be covered by this issue, or should be split into another issue, but I just want to get this down.

After considering this some more, it is not just the names of the installed templates I would want to know, but these pieces of information as well.

  • List of the filenames of the files that each template creates
  • List of parameters that can be passed to a template (probably overall or maybe per file?)
  • If installed via a package, the description of the template might be nice to see.
  • If installed via a package, the version of the package
  • If set, note if it is the default template.

@TheCakeIsNaOH
Copy link
Member

TheCakeIsNaOH commented Oct 14, 2021

After some discussion with @gep13, this is now planned to be implemented a new command, template instead of in new. This is because using choco new to list templates seems to be diluting what the command does.

A suggestion was that the parameters in the templates should be cached instead of being read every time. This will add significant complexity, so I am probably going to hold off on implementing that right away, and instead tackle displaying the list of parameters as a follow along PR.

I am thinking of implementing two subcommands; list and info. List will list the template names, version (if applicable), and note the default template. Info will take the name of a template as a parameter and print out all of the information for that specific template.

@gep13 gep13 modified the milestones: 0.11.x, 0.12.0 Nov 18, 2021
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 11, 2021
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 11, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 11, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Dec 23, 2021
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Dec 23, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Dec 23, 2021
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Dec 23, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Dec 23, 2021
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Dec 23, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 27, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 27, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 27, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 27, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 27, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Dec 28, 2021
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 5, 2022
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
@corbob corbob added the ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added label Jan 5, 2022
@gep13 gep13 removed the Up For Grabs label Jan 5, 2022
TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 5, 2022
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 10, 2022
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 10, 2022
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 10, 2022
This is in preparation for creation of a list_noop method to be used by
the template command. Having just a noop method can be confusing if
there are both generate and list methods.
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Jan 10, 2022
This allows a user to get information about all installed templates, or
a specific template. The list subcommand lists all installed templates.
The info subcommand lists verbose information about a specific template

Usage with -r should output a machine parsable list of the installed
templates. Usage with verbose (implied with the info subcommand)
outputs more information about the template(s).

The information displayed here can be gathered by running the list
command, config command and inspecting the contents of the
TemplatesLocation. However, this command allows the information to be
displayed in one location.
@gep13 gep13 changed the title Get template names for choco new Add command to retrieve information about currently installed package templates Jan 10, 2022
gep13 added a commit to TheCakeIsNaOH/choco that referenced this issue Jan 10, 2022
gep13 added a commit that referenced this issue Jan 10, 2022
@gep13 gep13 added 4 - Done and removed 3 - Review labels Jan 10, 2022
@gep13 gep13 changed the title Add command to retrieve information about currently installed package templates Add command (choco template) to retrieve information about currently installed package templates Jan 17, 2022
gep13 added a commit that referenced this issue Jan 18, 2022
* release/0.12.0: (102 commits)
  (maint) Add generation of template command
  (#2522) Update documentation
  (maint) Remove unnecessary whitespace
  (#2522) Remove deprecated ScriptsCheckLastExitCode
  (maint) Fix spelling mistake
  (version) 0.12.0-beta
  (#2518) Add tab completion for template command
  (#2481) Warn about unuspported packages on non-Windows
  (#357) Add information about when command added
  (#449) Add information about when command added
  (#499) Add specs for template service list noop
  (#499) Add specs for template command
  (#449) Add template command
  (#449) Template service rename noop to generate_noop
  (#2434) Correct casing of filename in changed files tests
  (#2434) Enable more scenarios, skip only shim and powershell facts
  (#2450) Enable configTransform tests on non-Windows
  (#2450) Enable functions on non-Windows systems
  (maint) Corrected casing of PowerShell
  (#2510) Exclude uninstalling with locked file on non-windows
  ...
@corbob corbob added IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen and removed ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added labels Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released Improvement IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen Priority_LOW
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants