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

Interface completer #16

Open
lukemovement opened this issue May 12, 2022 · 1 comment
Open

Interface completer #16

lukemovement opened this issue May 12, 2022 · 1 comment

Comments

@lukemovement
Copy link

lukemovement commented May 12, 2022

Hey, can you allow us more control over the behaviour of the interface? Passing Partial<ReadLineOptions> through shellFacade.bootstrap or have it return the readline interface?

My end goal is the implemented the following which would allow for an auto complete functionality

completer: (line: string) => {
    const commands = this.shellFacade.getAllCommands();
    const filteredCommands = commands
      .map((command) => command.name)
      .filter((command) => command.startsWith(line));

    return [filteredCommands, line];
  },
@bmstefanski
Copy link
Owner

Hi @lukemovement , thanks for the issue. Sadly I don't have enough free time to commit to this, but I will gladly review & accept a PR if you decide to create one

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