Skip to content

Add zef completion#8114

Merged
faho merged 1 commit intofish-shell:masterfrom
CIAvash:zef_completion
Jul 11, 2021
Merged

Add zef completion#8114
faho merged 1 commit intofish-shell:masterfrom
CIAvash:zef_completion

Conversation

@CIAvash
Copy link
Copy Markdown
Contributor

@CIAvash CIAvash commented Jul 5, 2021

zef is a module manager for Raku programming language.

Comment thread share/completions/zef.fish Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread share/completions/zef.fish Outdated
Comment thread share/completions/zef.fish Outdated
Comment thread share/completions/zef.fish Outdated
Comment thread share/completions/zef.fish
Comment thread share/completions/zef.fish Outdated
[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
Copy Markdown
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.

2 participants