bbende / nifi

Mirror of Apache NiFi
Apache License 2.0
1 stars 1 forks source link

Add a `cd` command to the interactive shell #22

Open aperepel opened 6 years ago

aperepel commented 6 years ago

When working with NiFi and Registry the concept of trees maps really well. root->PG->PG for NiFi, bucket->flow->version for Registry. Here's an idea. Maintain a stack in the Context object that is passed into every command already so we keep track of where one is in that tree. Next, enable transparent lookups of buckets/flows/versions when triggered by the Tab auto-completion. Effectively, issues variants of list() commands as needed.

The cli can error out when the command is used in a non-interactive mode