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 completion should not show file by default #340

Open
chaopeng opened this issue Nov 30, 2023 · 2 comments
Open

Fish completion should not show file by default #340

chaopeng opened this issue Nov 30, 2023 · 2 comments
Assignees

Comments

@chaopeng
Copy link

chaopeng commented Nov 30, 2023

version of completion script: https://github.com/ducaale/xh/blob/b694c7776b4e016cd5dfcbff42be6729fbdaa0af/completions/xh.fish

How to repro?

in fish shell type "xh ", the completion give files.

How to fix?

in the beginning of the completion script, add

complete -c xh -f

to disable file completion. See the example from fish shell: https://fishshell.com/docs/current/completions.html

I found xh is using clap to parse cli args and gen completion script. I have no experience in this lib, ValueHint maybe help.

@blyxxyz
Copy link
Collaborator

blyxxyz commented Nov 30, 2023

If we do that then we should make sure to add the file completion back in for options like --session. (Seems like ValueHint can be used for that.)

@chaopeng
Copy link
Author

complete -c xh -f

Only means dont hint file for "xh ". But ValueHint must be the better solution.

@blyxxyz blyxxyz self-assigned this Dec 9, 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

No branches or pull requests

2 participants