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

shell api question #328

Open
theoweiss opened this issue Feb 25, 2021 · 4 comments
Open

shell api question #328

theoweiss opened this issue Feb 25, 2021 · 4 comments

Comments

@theoweiss
Copy link

Hi,

I have two questions concerning the api.

  1. I have a GroupCommand which contain another list of GroupComamnds. For example:
    A command named "module" with sub commands "tag" and "project". The tag and project command each have the sub commands add and delete:
module
  module tag add
  module tag delete
  module project add
  module project delete

Now I want to implement the possibilty to enter in a sub command mode by typing the group command name. In this sub command mode only the the sub commands of the inner group command are available. I hope the following example clarifies what I mean:

[myRootPrompt]$ module
module>
module> project
module:project> add someargs
module:project> delete someOtherArgs
module:project> exit
module>
module>tag
module:tag> add someTagArgs
module:tag> delete someOtherTagArgs
module:tag> exit
module>
module>exit
[myRootPrompt]$

Which is the best way to achieve this with aesh?

  1. I want to share some variable information among all commands, comparable to environment variables in bash. I've found the ExportCommand but I'm not sure if it is ready to use and how to use it. Another way seems to be a CustomCommandInvocation. What is the best way?

Thanks in advance,
Theo

@theoweiss
Copy link
Author

@stalep I would appriciate any guidance.

@stalep
Copy link
Member

stalep commented Mar 23, 2021

Hi @theoweiss, this was an interesting idea I haven't thought of tbh. I have to have a look to see how we can do this in æsh. I haven't done anything like this before, but it should be possible I think.

@theoweiss
Copy link
Author

Hi @stalep, did you get any further?

@theoweiss
Copy link
Author

@stalep ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants