-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
FROM alpine | ||
FROM ubuntu | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y bash curl elvish git scala | ||
|
||
RUN apk add --no-cache curl gcompat | ||
RUN apk add --no-cache \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ | ||
elvish | ||
RUN curl -fL "https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" \ | ||
| gzip -d > /usr/bin/cs \ | ||
&& chmod +x /usr/bin/cs | ||
|
||
RUN cs setup -y | ||
RUN cs install bloop --only-prebuilt=true | ||
|
||
ENV PATH="$PATH:/root/.local/share/coursier/bin" | ||
RUN bloop | ||
ENTRYPOINT [ "bash" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package bloop | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/carapace-sh/carapace" | ||
) | ||
|
||
func autocomplete(mode string) carapace.Action { | ||
return carapace.ActionExecCommand("bloop", "autocomplete", "--format", "fish", "--mode", mode)(func(output []byte) carapace.Action { | ||
lines := strings.Split(string(output), "\n") | ||
vals := make([]string, 0) | ||
|
||
for _, line := range lines { | ||
if line != "" { | ||
value, description, _ := strings.Cut(line, "\t") | ||
vals = append(vals, value, description) | ||
} | ||
} | ||
return carapace.ActionValuesDescribed(vals...) | ||
}) | ||
} | ||
|
||
// ActionProjects completes projects | ||
// | ||
// one | ||
// two | ||
func ActionProjects() carapace.Action { | ||
return autocomplete("projects").Tag("projects") | ||
} | ||
|
||
// ActionProtocols completes protocols | ||
// | ||
// local | ||
// tcp | ||
func ActionProtocols() carapace.Action { | ||
return autocomplete("protocols").Tag("protocols") | ||
} | ||
|
||
// ActionReporters completes ActionReporters | ||
// | ||
// scalac | ||
// bloop | ||
func ActionReporters() carapace.Action { | ||
return autocomplete("reporters").Tag("reporters") | ||
} |