Skip to content

Remember previous answers #24

@michalbundyra

Description

@michalbundyra

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions