Skip to content

Commit

Permalink
updated package path
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 11, 2024
1 parent 4cc4219 commit 20e3b48
Show file tree
Hide file tree
Showing 35 changed files with 89 additions and 89 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# carapace-spec

[![PkgGoDev](https://pkg.go.dev/badge/github.com/rsteube/carapace-spec/pkg/actions)](https://pkg.go.dev/github.com/rsteube/carapace-spec)
[![GoReportCard](https://goreportcard.com/badge/github.com/rsteube/carapace-spec)](https://goreportcard.com/report/github.com/rsteube/carapace-spec)
[![documentation](https://img.shields.io/badge/‌-documentation-blue?logo=gitbook)](https://rsteube.github.io/carapace-spec/)
[![Coverage Status](https://coveralls.io/repos/github/rsteube/carapace-spec/badge.svg?branch=master)](https://coveralls.io/github/rsteube/carapace-spec?branch=master)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/carapace-sh/carapace-spec/pkg/actions)](https://pkg.go.dev/github.com/carapace-sh/carapace-spec)
[![GoReportCard](https://goreportcard.com/badge/github.com/carapace-sh/carapace-spec)](https://goreportcard.com/report/github.com/carapace-sh/carapace-spec)
[![documentation](https://img.shields.io/badge/‌-documentation-blue?logo=gitbook)](https://carapace-sh.github.io/carapace-spec/)
[![Coverage Status](https://coveralls.io/repos/github/carapace-sh/carapace-spec/badge.svg?branch=master)](https://coveralls.io/github/carapace-sh/carapace-spec?branch=master)
[![Packaging status](https://repology.org/badge/tiny-repos/carapace-spec.svg)](https://repology.org/project/carapace-spec/versions)

Define simple completions using a spec file (based on [carapace](https://github.com/rsteube/carapace)).
Define simple completions using a spec file (based on [carapace](https://github.com/carapace-sh/carapace)).

The `carapace-spec` binary can be used to complete spec files, but [carapace-bin](https://github.com/rsteube/carapace-bin) is recommended as it supports a range of [custom macros](https://rsteube.github.io/carapace-bin/spec/macros.html).

Expand Down
2 changes: 1 addition & 1 deletion action.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sort"
"strings"

"github.com/carapace-sh/carapace"
"github.com/invopop/jsonschema"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"gopkg.in/yaml.v3"
Expand Down
4 changes: 2 additions & 2 deletions cmd/carapace-spec/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"path/filepath"
"strings"

"github.com/rsteube/carapace"
spec "github.com/rsteube/carapace-spec"
"github.com/carapace-sh/carapace"
spec "github.com/carapace-sh/carapace-spec"
"github.com/spf13/cobra"
"gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/carapace-spec/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "github.com/rsteube/carapace-spec/cmd/carapace-spec/cmd"
import "github.com/carapace-sh/carapace-spec/cmd/carapace-spec/cmd"

func main() {
cmd.Execute()
Expand Down
4 changes: 2 additions & 2 deletions codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strconv"
"strings"

"github.com/rsteube/carapace-spec/internal/pflagfork"
"github.com/carapace-sh/carapace-spec/internal/pflagfork"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand All @@ -22,7 +22,7 @@ type codegenCmd struct {
func (s codegenCmd) formatHeader() string {
return `package cmd
import (
"github.com/rsteube/carapace"
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
`
Expand Down
4 changes: 2 additions & 2 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path/filepath"
"regexp"

"github.com/rsteube/carapace"
"github.com/rsteube/carapace-spec/pkg/command"
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-spec/pkg/command"
"github.com/spf13/cobra"
"gopkg.in/yaml.v3"
)
Expand Down
6 changes: 3 additions & 3 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
_ "embed"
"testing"

"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/sandbox"
"github.com/rsteube/carapace/pkg/style"
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/sandbox"
"github.com/carapace-sh/carapace/pkg/style"
)

//go:embed example/command.yaml
Expand Down
2 changes: 1 addition & 1 deletion core.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"runtime"
"strings"

"github.com/rsteube/carapace"
"github.com/carapace-sh/carapace"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ title = "carapace-spec"
default-theme = "Mocha"
additional-css = ["asciinema/asciinema-player.css", "./theme/catppuccin.css"]
additional-js = ["asciinema/asciinema-player.min.js", "asciinema/load.js"]
git-repository-url = "https://github.com/rsteube/carapace-spec"
edit-url-template = "https://github.com/rsteube/carapace-spec/edit/master/docs/{path}"
git-repository-url = "https://github.com/carapace-sh/carapace-spec"
edit-url-template = "https://github.com/carapace-sh/carapace-spec/edit/master/docs/{path}"

[output.html.fold]
enable = true
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# carapace-spec

Define simple completions using a spec file (based on [carapace](https://github.com/rsteube/carapace)).
Define simple completions using a spec file (based on [carapace](https://github.com/carapace-sh/carapace)).

```yaml
name: mycmd
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/completion/dash.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dash

Define [dash completion](https://rsteube.github.io/carapace/carapace/gen/dashCompletion.html).
Define [dash completion](https://carapace-sh.github.io/carapace/carapace/gen/dashCompletion.html).

```yaml
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/completion/dashAny.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DashAny

Define [dash any completion](https://rsteube.github.io/carapace/carapace/gen/dashAnyCompletion.html).
Define [dash any completion](https://carapace-sh.github.io/carapace/carapace/gen/dashAnyCompletion.html).

```yaml
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/completion/flag.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Flag

Define [flag completion](https://rsteube.github.io/carapace/carapace/gen/flagCompletion.html).
Define [flag completion](https://carapace-sh.github.io/carapace/carapace/gen/flagCompletion.html).

```yaml
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/completion/positional.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Positional

Define [positional completion](https://rsteube.github.io/carapace/carapace/gen/positionalCompletion.html).
Define [positional completion](https://carapace-sh.github.io/carapace/carapace/gen/positionalCompletion.html).

```yaml
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/completion/positionalAny.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PositionalAny

Define [positional any completion](https://rsteube.github.io/carapace/carapace/gen/positionalCompletion.html).
Define [positional any completion](https://carapace-sh.github.io/carapace/carapace/gen/positionalCompletion.html).

```yaml
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ flags:

## Non-posix

With [carapace-pflag](https://github.com/rsteube/carapace-pflag) non-posix flags possible as well:
With [carapace-pflag](https://github.com/carapace-sh/carapace-pflag) non-posix flags possible as well:

```yaml
-np: non-posix shorthand
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
group: core
```
[Group]:https://rsteube.github.io/carapace/carapace/command/group.html
[Group]:https://carapace-sh.github.io/carapace/carapace/command/group.html
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/command/name.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name of the command.
name: add
```
It can also contain the one-line [usage](https://rsteube.github.io/carapace/carapace/action/usage.html) message.
It can also contain the one-line [usage](https://carapace-sh.github.io/carapace/carapace/action/usage.html) message.
```yaml
name: add [-F file | -D dir]... [-f format] profile
Expand Down
2 changes: 1 addition & 1 deletion docs/src/carapace-spec/macros.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Macros

Macros are basically [Actions](https://rsteube.github.io/carapace/carapace/action.html) exposed to the spec (E.g. [`$files([.go, go.mod])`](https://rsteube.github.io/carapace/carapace/action/actionFiles.html).
Macros are basically [Actions](https://carapace-sh.github.io/carapace/carapace/action.html) exposed to the spec (E.g. [`$files([.go, go.mod])`](https://carapace-sh.github.io/carapace/carapace/action/actionFiles.html).

> The brackets are optional if no argument is passed (so `$files` is equivalent to `$files()`).
12 changes: 6 additions & 6 deletions docs/src/carapace-spec/macros/core.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Core

Core macros provided by [carapace-spec](https://github.com/rsteube/carapace-spec).
Core macros provided by [carapace-spec](https://github.com/carapace-sh/carapace-spec).

## directories

[`$directories`](https://rsteube.github.io/carapace/carapace/defaultActions/actionDirectories.html) completes directories.
[`$directories`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionDirectories.html) completes directories.
```yaml
["$directories"]
```

## exec

[`$(<command>)`](https://rsteube.github.io/carapace/carapace/defaultActions/actionExecCommand.html) executes given command in a `sh` / `pwsh` shell.
[`$(<command>)`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionExecCommand.html) executes given command in a `sh` / `pwsh` shell.

```yaml
["$(echo -e 'a\nb\nc')"]
```

## executables

[`$executables`](https://rsteube.github.io/carapace/carapace/defaultActions/actionExecutables.html) completes [PATH] executables.
[`$executables`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionExecutables.html) completes [PATH] executables.

```yaml
["$executables"]
```

## files

[`$files([<suffixes>])`](https://rsteube.github.io/carapace/carapace/defaultActions/actionFiles.html) completes files with an optional list of suffixes to filter on.
[`$files([<suffixes>])`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionFiles.html) completes files with an optional list of suffixes to filter on.

```yaml
["$files([.go, go.mod, go.sum])"]
```

## message

[`$message(<message>)`](https://rsteube.github.io/carapace/carapace/defaultActions/actionMessage.html) adds given error message to completion.
[`$message(<message>)`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionMessage.html) adds given error message to completion.

```yaml
["$message(some error)"]
Expand Down
4 changes: 2 additions & 2 deletions docs/src/carapace-spec/macros/custom.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Custom

Custom macros can be added with [`AddMacro`](https://pkg.go.dev/github.com/rsteube/carapace-spec#AddMacro).
Custom macros can be added with [`AddMacro`](https://pkg.go.dev/github.com/carapace-sh/carapace-spec#AddMacro).

```go
// `$_noarg` without argument
Expand All @@ -17,7 +17,7 @@ AddMacro("vararg", MacroV(func(s ...string) carapace.Action { return carapace.Ac
## Default (experimental)

A `Default()` method can be added to a struct passed to [`MacroI`](https://pkg.go.dev/github.com/rsteube/carapace-spec#MacroI).
A `Default()` method can be added to a struct passed to [`MacroI`](https://pkg.go.dev/github.com/carapace-sh/carapace-spec#MacroI).

It will be called when the macro is used without argumeng (`$_arg` instead of `$_arg({user: example})`).

Expand Down
Loading

0 comments on commit 20e3b48

Please sign in to comment.