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

Tab Completion will complete positional arg when there is no completer function #34

Open
Rudedog9d opened this issue Jun 29, 2017 · 0 comments

Comments

@Rudedog9d
Copy link
Contributor

Lets take the command tail [-n NUM] FILE as an example:

Whenever a optional argument (-n) with a value (NUM) exists and is tab completed, pypsi checks for a callback to get the value for NUM. Because a callback doesn't exist, the current behavior (wrongly) assumes that the option -n does not have a value, and tries to complete FILE instead of waiting for NUM to be consumed

Possible Solutions

  1. Improve the way optional args tab-complete
  2. Make sure optional args always have a callback (ex, default to completer=lamba x,y,z: [] to return an empty list)
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