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

No longer suggest input as tab completion #417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

InstantlyMoist
Copy link

This PR fixes ACF giving the players input back as a tab-complete suggestion.

Previously:
image
Expected was to only receive 'skull' right here, as that's the only registered @Subcommand

After:
image
No suggestion is given, and it auto-fills to the correct subcommand.

I'm not entirely sure what the impact of this is, as I only started using the framework 2 days ago. But I'm more than happy to receive feedback.

@chickeneer
Copy link
Collaborator

Hey there. I have looked into this. This might fix your specific example, but I do think it is a solution that could have unintended consequences. Let's say if the typed in text is already valid text.

So, my big question was why the s was getting added to the completions in the first place. So code searching led me to the two following code spots.

https://github.com/aikar/commands/blob/master/core/src/main/java/co/aikar/commands/CommandCompletions.java#L216

https://github.com/aikar/commands/blob/master/core/src/main/java/co/aikar/commands/CommandCompletions.java#L305

I will have to do some tinkering to figure out which can be axed safely. On one hand, an empty list could be safe to tell the client just that nothing was found. But I want to make sure that there are no side effects like Tab-ing deleting deleting what they had already typed in for some reason.

I will look into this further. Leaving this open for now. Again, I don't think this is the desired solution.

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 this pull request may close these issues.

2 participants