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

Remember previous answers #24

Open
michalbundyra opened this issue Jun 4, 2020 · 1 comment
Open

Remember previous answers #24

michalbundyra opened this issue Jun 4, 2020 · 1 comment
Labels
Feature Request Help Wanted Extra attention is needed

Comments

@michalbundyra
Copy link
Member

Feature Request

Q A
New Feature yes

Summary

As mentioned in #20 (comment) I'd like to have an option to remember previous answers and reuse them in the future calls of the same commands.

I think it should work as follows:

  • all answers should be remembered somewhere and suggested on the next call od the command
  • it should work ONLY in interactive mode, so executing command in non-interactive mode will use default values (or values provided in options), but never remembered answers.

We might consider also another feature in that case: configure fixed values for parameters. What I mean by that, let say we have a command:

$ vendor/bin/laminas my-command --composer=<composer> --modules=<dir/to/modules/> ...

we might configure values for these parameters:

'laminas-cli' => [
    'parameters' => [
        'my-command' => [ // or the command class name 
            '--modules' => './modules',
            '--composer' => '/usr/local/bin/composer',
        ],
    ],
],

so executing command without options provided will use configured values before default values and question in interactive mode will be skipped.
In non-interactive mode configured values should be used before default values.

@michalbundyra michalbundyra added Help Wanted Extra attention is needed Feature Request labels Jun 4, 2020
@its-leofisher
Copy link

What convention to follow for configs? possibly 'src/configs/command-name.extension'
Can be same storage format for answers as well? 'commandname-answers.extension'

@froschdesign froschdesign added the hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com label Sep 30, 2020
@weierophinney weierophinney removed the hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com label Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Help Wanted Extra attention is needed
Projects
Development

No branches or pull requests

4 participants