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 for nameplates gives error #471

Open
piegamesde opened this issue Dec 29, 2022 · 4 comments
Open

Tab completion for nameplates gives error #471

piegamesde opened this issue Dec 29, 2022 · 4 comments

Comments

@piegamesde
Copy link
Member

I tried out the tab completion of nameplates for fun and ran into an error.

  1. wormhole receive
  2. Type a digit then tab, try a few times until it completes
  3. Erase the completed bit, type a digit and press tab again
Enter receive wormhole code: 4completer exception: nameplate (1-) already entered, cannot go back
Traceback (most recent call last):
  File "/nix/store/vshzbil4ps6rybwljfi3swwg2w2x0ihi-python3.10-magic-wormhole-0.12.0/lib/python3.10/site-packages/wormhole/_rlcompleter.py", line 45, in completer
    return self._wrapped_completer(text, state)
  File "/nix/store/vshzbil4ps6rybwljfi3swwg2w2x0ihi-python3.10-magic-wormhole-0.12.0/lib/python3.10/site-packages/wormhole/_rlcompleter.py", line 59, in _wrapped_completer
    self._matches = self._commit_and_build_completions(text)
  File "/nix/store/vshzbil4ps6rybwljfi3swwg2w2x0ihi-python3.10-magic-wormhole-0.12.0/lib/python3.10/site-packages/wormhole/_rlcompleter.py", line 94, in _commit_and_build_completions
    raise AlreadyInputNameplateError(
wormhole.errors.AlreadyInputNameplateError: nameplate (1-) already entered, cannot go back

In general I am increasingly convinced that this entire feature should just be removed, as it involves quite a bit of complexity without really improving the user experience. Think about it, how often have you used it yourself? (Tbf I think it could be made worthwhile having so that users would actually use it, but that would require even more effort)

@meejah
Copy link
Member

meejah commented Dec 29, 2022

I use tab-completion on the "words" part all the time .. so just clarifying if you mean "remove tab-completion" or just "remove tab-completion of the nameplate part only"...?

(It could use something else for the UX in non-CLI applications but I do agree that its utility isn't great for the nameplate part itself in the CLI)

@piegamesde
Copy link
Member Author

This issue is about the nameplate completion only.

@meejah
Copy link
Member

meejah commented Dec 29, 2022

I agree the utility of the nameplate portion of tab-completion is .. definitely far less useful than the rest.

Additionally (off the top of my head):

  • the nameplate completion depends on the list command, which makes DoS easier (for example)
  • word-list internationalization probably wants mailbox (and not nameplate) attributes for security reasons (so can't use list anyway)
  • from the above stack-trace it appears at least this client already needs you to "commit" to a nameplate fairly early anyway

Perhaps there are other reasons to add (either for or against) but I would put all of the above in the "reasons to remove nameplate completion" column :)

@vu3rdd
Copy link
Contributor

vu3rdd commented Dec 30, 2022

I too use tab-completion mostly for the words and it is very useful. I agree, nameplate completion and commitment is far less useful as a user.

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

3 participants