Skip to content

Add completion for Rakudo #8113

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

Merged
merged 1 commit into from
Jul 12, 2021
Merged

Conversation

CIAvash
Copy link
Contributor

@CIAvash CIAvash commented Jul 5, 2021

Rakudo is an implementation of the Raku programming language.

I set the $rakudo command to the filename, so that users can easily create a raku.fish symlink to rakudo.fish, if they want Rakudo completions for the raku(which is a symlink to an implementation) command.

@faho
Copy link
Member

faho commented Jul 5, 2021

I set the $rakudo command to the filename, so that users can easily create a raku.fish symlink to rakudo.fish, if they want Rakudo completions for the raku(which is a symlink to an implementation) command.

If they want that, they can just use

complete -c raku -w rakudo

No need to add special support, just use complete -c rakudo like normal.

@faho faho added this to the fish 3.4.0 milestone Jul 5, 2021
@CIAvash CIAvash force-pushed the rakudo_completion branch from aee26d0 to 8ace518 Compare July 5, 2021 11:56
@CIAvash CIAvash force-pushed the rakudo_completion branch from 8ace518 to 8b30df6 Compare July 5, 2021 17:17
@zanchey
Copy link
Member

zanchey commented Jul 10, 2021

I think the first two lines can just be complete -c rakudo -n __fish_is_first_token -F -a - -d 'Read program source from STDIN or start REPL if a TTY'?

@krobelus krobelus mentioned this pull request Jul 11, 2021
3 tasks
@CIAvash CIAvash force-pushed the rakudo_completion branch from 8b30df6 to 9541b09 Compare July 11, 2021 11:34
@krobelus
Copy link
Contributor

One more quick thing: we usually try to avoid parentheses in completion descriptions, because fish already adds them.
Here are some suggestions, but the current version is fine of course.

diff --git a/share/completions/rakudo.fish b/share/completions/rakudo.fish
index 06804354c..491fe19e8 100644
--- a/share/completions/rakudo.fish
+++ b/share/completions/rakudo.fish
@@ -2 +2 @@ complete -c rakudo -n __fish_is_first_token -F -a - -d 'Read program source from
-complete -c rakudo -s c -d 'Check syntax only (runs BEGIN and CHECK blocks)'
+complete -c rakudo -s c -d 'Check syntax only. Runs BEGIN and CHECK blocks'
@@ -11 +11 @@ complete -c rakudo -l target -x -k -a 'start parse syntaxcheck ast optimize mast
-complete -c rakudo -l optimize -x -d 'use the given level of optimization (0..3)' -a '0 1 2 3'
+complete -c rakudo -l optimize -x -d 'use the given level of optimization, pass 0-3' -a '0 1 2 3'
@@ -17 +17 @@ complete -c rakudo -l stagestats -d 'Display time spent in the compilation stage
-complete -c rakudo -l repl-mode -x -d 'Specify the REPL mode' -a 'interactive\t"Starts Interactive REPL (default)" non-interactive\t"STDIN is read entirely and evaluated as if it were a program"'
+complete -c rakudo -l repl-mode -x -d 'Specify the REPL mode' -a 'interactive\t"Start the default interactive REPL" non-interactive\t"STDIN is read entirely and evaluated as if it were a program"'
@@ -23 +23 @@ complete -c rakudo -l debug-port -x -d 'Listen for incoming debugger connections
-complete -c rakudo -l tracing -f -d 'Output a line to stderr on every interpreter instr (only if enabled in MoarVM)'
+complete -c rakudo -l tracing -f -d 'Output a line to stderr on every interpreter instr, if enabled in MoarVM'

[Rakudo](https://rakudo.org/) is an implementation of the
[Raku](https://raku.org/) programming language.
@CIAvash CIAvash force-pushed the rakudo_completion branch from 9541b09 to be77013 Compare July 11, 2021 14:49
@krobelus krobelus merged commit ab201f7 into fish-shell:master Jul 12, 2021
@krobelus
Copy link
Contributor

Thanks!

@CIAvash CIAvash deleted the rakudo_completion branch July 12, 2021 19:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 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.

4 participants