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

Improving shell completions: hide certain commands #789

Open
fingolfin opened this issue Jan 14, 2024 · 3 comments · May be fixed by #1036
Open

Improving shell completions: hide certain commands #789

fingolfin opened this issue Jan 14, 2024 · 3 comments · May be fixed by #1036
Labels
bug Something isn't working

Comments

@fingolfin
Copy link
Contributor

First off, thanks to @BoostCookie for adding shell completions in PR #753. (By the way I think this means #151 can be closed now?)

One very minor nitpick: if I enter juliaup then press TAB twice, I get this:

~$ juliaup
-h                                    status
-V                                    gc
--help                                config
--version                             api
default                               46029ef5-0b73-4a71-bff3-d0d05de42aac
add                                   0cf1528f-0b15-46b1-9ac9-e5bf5ccccbcf
link                                  info
list                                  self
override                              completions
update                                4c79c12db1d34bbbab1f6c6f838f423f
remove                                help

Note the weird UUIds / hex codes -- I think these are internal "commands", an implementation details -- I wonder if there is a way to hide them from the user?

I also think that -h, -V, --help, --version should be hidden -- that's also how shell completion for git and cargo is done (which both support --help and --version)

@davidanthoff
Copy link
Collaborator

Oh, yes, these uuid commands are internal and should definitely not be exposed to end-users in any way! They are just meant to be used from the julialauncher. I think that is something we should try to fix before we release a new build.

@davidanthoff davidanthoff added the bug Something isn't working label Jan 14, 2024
@fingolfin fingolfin changed the title Improving shell completion code Improving shell completion code: hide certain commands Jan 14, 2024
@fingolfin fingolfin changed the title Improving shell completion code: hide certain commands Improving shell completions: hide certain commands Jan 14, 2024
@BoostCookie
Copy link
Contributor

When adding the completions I also noticed these uuid commands.
clap currently has an open issue about hiding some commands from the completions.

@davidanthoff
Copy link
Collaborator

Uh, that is a bit frustrating... Not entirely sure what we should do there, we definitely don't want end-users to start to run these internal commands, but I also see the value of these completions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants