Skip to content

Commit

Permalink
gh: updated linguist languages
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 14, 2024
1 parent 355d917 commit 2f4f80c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func init() {

carapace.Gen(repo_listCmd).FlagCompletion(carapace.ActionMap{
"json": action.ActionRepositoryFields().UniqueList(","),
"language": action.ActionLanguages(),
"language": gh.ActionLanguages(),
"topic": carapace.ActionCallback(func(c carapace.Context) carapace.Action {
if len(c.Args) > 0 {
return action.ActionTopics(repo_listCmd, c.Args[0]).UniqueList(",")
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/search_issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func init() {
"label": action.ActionSearchMultiRepo(search_issuesCmd, func(cmd *cobra.Command) carapace.Action {
return action.ActionLabels(cmd).UniqueList(",")
}),
"language": action.ActionLanguages(),
"language": gh.ActionLanguages(),
"match": carapace.ActionValues("title", "body", "comments").UniqueList(","),
"mentions": gh.ActionUsers(gh.HostOpts{}),
"milestone": action.ActionSearchMultiRepo(search_issuesCmd, func(cmd *cobra.Command) carapace.Action {
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/search_prs.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func init() {
"label": action.ActionSearchMultiRepo(search_prsCmd, func(cmd *cobra.Command) carapace.Action {
return action.ActionLabels(cmd).UniqueList(",")
}),
"language": action.ActionLanguages(),
"language": gh.ActionLanguages(),
"match": carapace.ActionValues("title", "body", "comments").UniqueList(","),
"mentions": gh.ActionUsers(gh.HostOpts{}),
"merged-at": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/search_repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func init() {
"created": action.ActionSearchRange(time.ActionDateTime(time.DateTimeOpts{Strict: true})),
"include-forks": carapace.ActionValues("false", "true", "only"),
"json": action.ActionSearchRepositoryFields().UniqueList(","),
"language": action.ActionLanguages(),
"language": gh.ActionLanguages(),
"license": gh.ActionLicenses(gh.HostOpts{}).UniqueList(","),
"match": carapace.ActionValues("name", "description", "readme").UniqueList(","),
"order": carapace.ActionValues("asc", "desc"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package action
package gh

import (
"github.com/carapace-sh/carapace"
)

// ActionLanguages completes repository languages
// curl https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml | yj -yj | jq --raw-output 'to_entries[] | "\"\(.key)\", \"\(.value.type)\","'
func ActionLanguages() carapace.Action {
// curl https://raw.githubusercontent.com/github/linguist/master/lib/linguist/languages.yml | yj -yj | jq --raw-output 'to_entries[] | "\"\(.key)\", \"\(.value.type)\","'
return carapace.ActionValuesDescribed(
"1C Enterprise", "programming",
"2-Dimensional Array", "data",
Expand Down Expand Up @@ -165,6 +165,7 @@ func ActionLanguages() carapace.Action {
"Easybuild", "data",
"Ecere Projects", "data",
"Ecmarkup", "markup",
"Edge", "markup",
"EdgeQL", "programming",
"EditorConfig", "data",
"Edje Data Collection", "data",
Expand Down Expand Up @@ -225,6 +226,7 @@ func ActionLanguages() carapace.Action {
"Git Revision List", "data",
"Gleam", "programming",
"Glimmer JS", "programming",
"Glimmer TS", "programming",
"Glyph", "programming",
"Glyph Bitmap Distribution Format", "data",
"Gnuplot", "programming",
Expand Down Expand Up @@ -381,6 +383,7 @@ func ActionLanguages() carapace.Action {
"Modula-2", "programming",
"Modula-3", "programming",
"Module Management System", "programming",
"Mojo", "programming",
"Monkey", "programming",
"Monkey C", "programming",
"Moocode", "programming",
Expand Down Expand Up @@ -420,6 +423,7 @@ func ActionLanguages() carapace.Action {
"OASv3-json", "data",
"OASv3-yaml", "data",
"OCaml", "programming",
"Oberon", "programming",
"ObjDump", "data",
"Object Data Instance Notation", "data",
"ObjectScript", "programming",
Expand Down Expand Up @@ -467,6 +471,7 @@ func ActionLanguages() carapace.Action {
"PicoLisp", "programming",
"PigLatin", "programming",
"Pike", "programming",
"Pip Requirements", "data",
"PlantUML", "data",
"Pod", "prose",
"Pod 6", "prose",
Expand Down Expand Up @@ -536,6 +541,7 @@ func ActionLanguages() carapace.Action {
"Ring", "programming",
"Riot", "markup",
"RobotFramework", "programming",
"Roc", "programming",
"Roff", "markup",
"Roff Manpage", "markup",
"Rouge", "programming",
Expand Down Expand Up @@ -577,6 +583,7 @@ func ActionLanguages() carapace.Action {
"Slash", "programming",
"Slice", "programming",
"Slim", "markup",
"Slint", "markup",
"SmPL", "programming",
"Smali", "programming",
"Smalltalk", "programming",
Expand Down Expand Up @@ -619,6 +626,7 @@ func ActionLanguages() carapace.Action {
"Terraform Template", "markup",
"Texinfo", "prose",
"Text", "prose",
"TextGrid", "data",
"TextMate Properties", "data",
"Textile", "prose",
"Thrift", "programming",
Expand Down

0 comments on commit 2f4f80c

Please sign in to comment.