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

Consider Adding Paramaterized Custom Commands #2151

Closed
rickspencer3 opened this issue Aug 17, 2016 · 3 comments
Closed

Consider Adding Paramaterized Custom Commands #2151

rickspencer3 opened this issue Aug 17, 2016 · 3 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@rickspencer3
Copy link

rickspencer3 commented Aug 17, 2016

Background
Some development environments receive commands, especially for code generation. For example, in Rails, in order to generate a model, you use this command:

rails generate model NAME [field[:type][:index] field[:type][:index]] [options]

In the case "NAME" is a required field. This command modifies multiple files. There are many such commands in Rails, which are necessary to use Rails effectively.

Another example is generating a project with Revel, where the user should typically specify a path that includes a repository location and a new application name, generally using their github account name to set up a typical Go workspace.

The Request:
We would like to be able to make our development containers easy to use in Che by wrapping obscure or difficult to discover and use commands in Che commands that appear in the IDE. However, the IDE does not currently support passing arguments to commands

For example, we could provide JSON such as:

    "commands": [
      {
        "name": "Create Project",
        "prompt": "Provide your github username and a name for your new project",
        "inputs", [{"text":"Github Id","name":"ghid"}, {"text":"Project Name","name":"proj"}]
        "type": "custom",
        "commandLine": "revel new {{ghid}}/{{proj}} && revel run {{ghid}}/{{proj}}",
        "attributes": {}
      }]

When run the IDE could pop open a dialog that collects the user input and runs the command (which in this specific case would create and run a properly named revel project). Some thought would need to be put into handling the user canceling, and also error handling.

We could make development frameworks much easier to learn with such functionality.

@slemeur slemeur added the kind/enhancement A feature request - must adhere to the feature request template. label Aug 18, 2016
@slemeur
Copy link
Contributor

slemeur commented Aug 18, 2016

@vzhukovskii + @ashumilova : We need to study that enhancement request with the work done along #953

@TylerJewell
Copy link

+1 - I think to be clear the only input type that we would accept would be text. I don't think there is any need for numbers, booleans or other types.

@skabashnyuk
Copy link
Contributor

Not relevant anymore. Please consider opening a new issue if you think it is up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

6 participants