Skip to content

pass the namespace to completion function #762

@teto

Description

@teto

I would like to set a choices_function that depends on the previous arguments, i.e., I believe cmd2 should pass the current parser namespace when calling the choices_function
Like I have this first argument that loads a csv file, and I would like the 2nd argument to choose between availables ids in the previously loaded csv file.
Right now the choices_function looks a bit useless and can only return static results.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions