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

Adds dynamic recipe completions for fish #625

Merged
merged 4 commits into from
May 4, 2020
Merged

Adds dynamic recipe completions for fish #625

merged 4 commits into from
May 4, 2020

Conversation

tyehle
Copy link
Contributor

@tyehle tyehle commented May 2, 2020

No description provided.

@casey
Copy link
Owner

casey commented May 3, 2020

This is great, thanks for this!

Will complete -c just -f disable file completions after recipes? Just recipes can have arguments, which might be paths to files.

@tyehle
Copy link
Contributor Author

tyehle commented May 3, 2020

Yeah it does. Changed it to only disable files before any subcommand.

@casey
Copy link
Owner

casey commented May 3, 2020

Also, will this interfere with options like --justfile, which take a file path?

@tyehle
Copy link
Contributor Author

tyehle commented May 3, 2020

Haha, yeah that is an issue and is not fixed. I'll take a look at the fish docs a bit more to see if there is something to take care of it.

@casey
Copy link
Owner

casey commented May 3, 2020

What do you think about actually landing this with --force-files set? This would be conservative in the sense that we could be sure that it would never break path completion where it was wanted, at the cost of sometimes enabling path completion where it wasn't wanted.

I think this would still be a huge improvement on the existing completions, and tightening them up could be left for later.

@tyehle
Copy link
Contributor Author

tyehle commented May 3, 2020

Makes sense and works for me

@tyehle
Copy link
Contributor Author

tyehle commented May 3, 2020

Looking at this again I realized that:

  1. Recipes were being disabled after the first one, which shouldn't happen
  2. There is an easy way to not suggest files for only the first argument and then enable them after that. I think this is a pretty good usable conservative approach.

Both of these issues should be fixed now

@casey casey merged commit fef69a3 into casey:master May 4, 2020
@casey
Copy link
Owner

casey commented May 4, 2020

Awesome, merged. Thank you very much!

@tyehle tyehle deleted the dynamic-fish-completions branch May 22, 2020 04:00
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