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

Fish completions do not work properly for subcommand specific options #359

Closed
4 tasks done
mrmeszaros opened this issue Jul 19, 2023 · 1 comment · Fixed by #358
Closed
4 tasks done

Fish completions do not work properly for subcommand specific options #359

mrmeszaros opened this issue Jul 19, 2023 · 1 comment · Fixed by #358

Comments

@mrmeszaros
Copy link

  • Poetry version: 1.5.1
  • Python version: 3.11.4
  • OS version and name: macOS 13.4.1
  • pyproject.toml: N/A
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

The fish completions do not work for subcommand specific options.
For example - as stated in #437:

  • poetry env info can be followed by the --executable option.
  • however, trying poetry env info --e TAB does not complete to --executable

The following line is responsible for defining the completion:

complete -c poetry -A -n '__fish_seen_subcommand_from "env info"' -l executable -d 'Only display the environment\'s python executable path.'

If I remove the quotes around "env info", then the tab completion starts working for poetry env info --e.
However, that causes poetry env use --e TAB to also autocomplete to --executable which is wrong.

I was able to get completions typing poerty 'env info' --e TAB - but it is just a workaround, to show what it is currently looking for.

After some digging, it seems to me that the fish-shell/fish-shell#7107 issue is tackling a similar problem (nested subcommand and option parsing), might be worth looking into once it's resolved.

@Keiku
Copy link

Keiku commented Aug 10, 2023

I have the same problem and it's very annoying. Can this issue be resolved by downgrading fish? Please let me know if there is a recommended version of fish.

@branchvincent branchvincent transferred this issue from python-poetry/poetry Aug 21, 2023
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

Successfully merging a pull request may close this issue.

2 participants