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

completions(fish): remove invalid file completions #656

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Aug 14, 2022

With the fish completions, writing a command or option that does not
take an argument and then pressing tab would suggest files and
directories:

$ bin/configlet sync [Tab]
bin/                config.json      docs/       LICENSE   README.md
CODE_OF_CONDUCT.md  config/          exercises/  mix.exs   reference/
concepts/           CONTRIBUTING.md  HELLO.md    mix.lock

even though adding such an argument would produce an error.

Remove those completions across the whole command, and then add them
only where we want them (directory completions for -t/--track-dir). This
also improves the completions for -t/--track-dir, since it would
previously suggest both files and directories.


Docs:

Before this commit, tab completion after a command/option that does
not take an argument would suggest files and directories:

    $ bin/configlet sync [Tab]
    bin/                config.json      docs/       LICENSE   README.md
    CODE_OF_CONDUCT.md  config/          exercises/  mix.exs   reference/
    concepts/           CONTRIBUTING.md  HELLO.md    mix.lock

even though adding such an argument would produce an error.

Remove those completions across the whole command, and then add them
only where we want them (directory completions for -t/--track-dir). This
also improves the completions for -t/--track-dir, since it would
previously suggest both files and directories.
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know nothing really about fish (insert corny joke here), so I'll just trust on your expertise.

@ee7 ee7 merged commit 121b40e into exercism:main Aug 17, 2022
@ee7 ee7 deleted the completions-fish-remove-file-completions branch August 17, 2022 09:50
@ee7 ee7 changed the title completions: fish: remove file completions completions(fish): remove invalid file completions Aug 17, 2022
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