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

Bug: Crash on tab completing xonsh #5521

Closed
midirhee12 opened this issue Jun 20, 2024 · 2 comments
Closed

Bug: Crash on tab completing xonsh #5521

midirhee12 opened this issue Jun 20, 2024 · 2 comments

Comments

@midirhee12
Copy link

Current Behavior

While in xonsh --no-rc, hit <tab> after typing:

$ xonsh --no-rc --no-

Traceback:

Unhandled exception in event loop:
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1920, in new_coroutine
    await coroutine(*a, **kw)
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1744, in async_completer
    async for completion in async_generator:
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/prompt_toolkit/completion/base.py", line 323, in get_completions_async
    async for completion in completer.get_completions_async(
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/prompt_toolkit/completion/base.py", line 199, in get_completions_async
    for item in self.get_completions(document, complete_event):
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/xonsh/ptk_shell/completer.py", line 59, in get_completions
    completions, plen = self.completer.complete(
                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/xonsh/completer.py", line 122, in complete
    return self.complete_from_context(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/xonsh/completer.py", line 273, in complete_from_context
    for comp in self.generate_completions(
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/xonsh/completer.py", line 234, in generate_completions
    for comp in res:
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/xonsh/cli_utils.py", line 485, in complete
    opt_completions = self._complete_options(options)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/yd9951zrb3a4d84df3qgd11dv7c03byf-python3-3.11.9-env/lib/python3.11/site-packages/xonsh/cli_utils.py", line 535, in _complete_options
    act, _, value = act_res
    ^^^^^^^^^^^^^

Exception too many values to unpack (expected 3)
Press ENTER to continue...

Expected Behavior

Show the expected tab completions below the cursor instead of crashing:

$ xonsh --no-rc --no-
                     --no-rc           --no-script-cache

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@anki-code
Copy link
Member

Duplication #5471

@anki-code anki-code closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
@anki-code
Copy link
Member

Please put +1 reaction to 5471

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