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

Add zef completion #8114

Merged
merged 1 commit into from
Jul 11, 2021
Merged

Add zef completion #8114

merged 1 commit into from
Jul 11, 2021

Conversation

CIAvash
Copy link
Contributor

@CIAvash CIAvash commented Jul 5, 2021

zef is a module manager for Raku programming language.

complete -c zef -n __fish_is_first_token -s h -l help -f -d 'Display help text'
complete -c zef -n __fish_is_first_token -l version -f -d 'Detailed version information'
complete -c zef -n 'not __fish_is_first_token' -l config-path -d 'Load a specific Zef config file'
complete -c zef -n '__fish_seen_argument -l config-path' -x -k -a '(__fish_complete_suffix)'
Copy link
Member

Choose a reason for hiding this comment

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

Which suffix?

If you just want file completions, use -F/--force-files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried that first, but it doesn't seem to work. Maybe because of complete -c zef -f. I tried different different combinations, and this was the only thing that worked for me.

Copy link
Contributor Author

@CIAvash CIAvash Jul 5, 2021

Choose a reason for hiding this comment

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

Hmm, I tried -F again with -r on --config-path and it seemed to work, this time! Will try it on other similar options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, it worked on all, but one:

complete -c zef -n '__fish_seen_subcommand_from install test build' -k -a '(__fish_complete_suffix)'

I don't know if there is another way.

Copy link
Member

Choose a reason for hiding this comment

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

Does

complete -c zef -n '__fish_seen_subcommand_from install test build' -F

not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. At least, not for me.

share/completions/zef.fish Outdated Show resolved Hide resolved
share/completions/zef.fish Outdated Show resolved Hide resolved
share/completions/zef.fish Outdated Show resolved Hide resolved
share/completions/zef.fish Outdated Show resolved Hide resolved
[zef](https://github.com/ugexe/zef) is a module manager for
[Raku](https://raku.org/) programming language.
@zanchey zanchey requested a review from faho July 10, 2021 13:08
@faho faho added this to the fish 3.4.0 milestone Jul 11, 2021
@faho faho merged commit 8d17f81 into fish-shell:master Jul 11, 2021
@faho
Copy link
Member

faho commented Jul 11, 2021

Merged, thanks!

@CIAvash CIAvash deleted the zef_completion branch July 11, 2021 11:47
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants