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

Proactively creating autocomplete index #272

Open
avishay28 opened this issue Jan 31, 2024 · 0 comments
Open

Proactively creating autocomplete index #272

avishay28 opened this issue Jan 31, 2024 · 0 comments

Comments

@avishay28
Copy link

avishay28 commented Jan 31, 2024

Is there a way to proactively index the autocomplete docs, without waiting for user to run aws-shell command?
I want to run it in advnace during startup, so when user will access the shell the files will already be ready in .aws/shell/cache, so the user won't need to wait. I coudn't find a way to do it, trying to run aws-shell command in non-interactive context (for example during ducker build) results in error

First run, creating autocomplete index...
Creating doc index in the background. It will be a few minutes before all documentation is available.
Traceback (most recent call last):
  File "/usr/local/bin/aws-shell", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/awsshell/__init__.py", line 70, in main
    shell.run()
  File "/usr/local/lib/python3.10/dist-packages/awsshell/app.py", line 292, in run
    document = self.cli.run(reset_current_buffer=True)
  File "/usr/local/lib/python3.10/dist-packages/awsshell/app.py", line 285, in cli
    self._cli = self.create_cli_interface(self.show_completion_columns)
  File "/usr/local/lib/python3.10/dist-packages/awsshell/app.py", line 486, in create_cli_interface
    cli = CommandLineInterface(application=app, eventloop=loop,
  File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/interface.py", line 80, in __init__
    self.output = output or create_output()
  File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/shortcuts.py", line 124, in create_output
    return Vt100_Output.from_pty(
  File "/usr/local/lib/python3.10/dist-packages/prompt_toolkit/terminal/vt100_output.py", line 424, in from_pty
    assert stdout.isatty()
AssertionError

@avishay28 avishay28 changed the title Proactivlity creating autocomplete index Proactively creating autocomplete index Jan 31, 2024
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

1 participant