Skip to content

Commit

Permalink
Merge pull request #64 from jippi/fix-update-carapace-source
Browse files Browse the repository at this point in the history
chore: update the GitHub org owning 'carapace'

Thanks for the PR
  • Loading branch information
maxlandon authored Feb 24, 2025
2 parents 269d85b + b28f9f8 commit c24827d
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 34 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
</a>
</p>

Console is an all-in-one console application library built on top of a [readline](https://github.com/reeflective/readline) shell and using [Cobra](https://github.com/spf13/cobra) commands.
It aims to provide users with a modern interface at at minimal cost while allowing them to focus on developing
Console is an all-in-one console application library built on top of a [readline](https://github.com/reeflective/readline) shell and using [Cobra](https://github.com/spf13/cobra) commands.
It aims to provide users with a modern interface at at minimal cost while allowing them to focus on developing
their commands and application core: the console will then transparently interface with these commands, and provide
the various features below almost for free.


## Features

### Menus & Commands
### Menus & Commands
- Bind cobra commands to provide the core functionality.
- Multiple menus with their own command tree, prompt engines and special handlers.
- All cobra settings can be modified, set and used freely, like in normal CLI workflows.
Expand All @@ -59,7 +59,7 @@ the various features below almost for free.
- All features of readline are supported in the console. It also allows the console to give:
- Configurable bind keymaps, commands and options, sane defaults, and per-application configuration.
- Out-of-the-box, advanced completions for commands, flags, positional and flag arguments.
- Provided by readline and [carapace](https://github.com/rsteube/carapace): automatic usage & validation command/flags/args hints.
- Provided by readline and [carapace](https://github.com/carapace-sh/carapace): automatic usage & validation command/flags/args hints.
- Syntax highlighting for commands (might be extended in the future).

### Others
Expand All @@ -71,11 +71,11 @@ the various features below almost for free.

## Documentation

You can install and use the [example application console](https://github.com/reeflective/console/tree/main/example). This example application
will give you a taste of the behavior and supported features. The following documentation
You can install and use the [example application console](https://github.com/reeflective/console/tree/main/example). This example application
will give you a taste of the behavior and supported features. The following documentation
is also available in the [wiki](https://github.com/reeflective/console/wiki):

* [Getting started](https://github.com/reeflective/console/wiki/Getting-Started)
* [Getting started](https://github.com/reeflective/console/wiki/Getting-Started)
* [Menus](https://github.com/reeflective/console/wiki/Menus)
* [Prompts](https://github.com/reeflective/console/wiki/Prompts)
* [Binding commands](https://github.com/reeflective/console/wiki/Binding-Commands)
Expand All @@ -90,14 +90,14 @@ is also available in the [wiki](https://github.com/reeflective/console/wiki):
![console](https://github.com/reeflective/console/blob/assets/console.gif)


## Status
## Status

The library is in a pre-release candidate status:
- Although quite simple and small, it has not been tested heavily.
- There are probably some features/improvements to be made.
- The API is quite stable. It is unlikely to change much in future versions.

Please open a PR or an issue if you wish to bring enhancements to it.
Please open a PR or an issue if you wish to bring enhancements to it.
Other contributions, as well as bug fixes and reviews are also welcome.


Expand Down
4 changes: 2 additions & 2 deletions commands/readline/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"strings"

"github.com/rsteube/carapace"
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"

"github.com/reeflective/readline"
Expand All @@ -22,7 +22,7 @@ func Bind(shell *readline.Shell) *cobra.Command {
Changing binds:
Note that the keymap name is optional, and if omitted, the default keymap is used.
The default keymap is 'vi' only if 'set editing-mode vi' is found in inputrc , and
The default keymap is 'vi' only if 'set editing-mode vi' is found in inputrc , and
unless the -m option is used to set a different keymap.
Also, note that the bind [seq] [command] slightly differs from the original bash 'bind' command.
Expand Down
2 changes: 1 addition & 1 deletion commands/readline/completers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package readline
import (
"fmt"

"github.com/rsteube/carapace"
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"

"github.com/reeflective/readline"
Expand Down
4 changes: 2 additions & 2 deletions commands/readline/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"strings"

"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
Expand Down
8 changes: 4 additions & 4 deletions completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"unicode"
"unicode/utf8"

"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
completer "github.com/rsteube/carapace/pkg/x"
"github.com/rsteube/carapace/pkg/xdg"
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
completer "github.com/carapace-sh/carapace/pkg/x"
"github.com/carapace-sh/carapace/pkg/xdg"

"github.com/reeflective/readline"
)
Expand Down
2 changes: 1 addition & 1 deletion example/main-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os/exec"
"strings"

"github.com/rsteube/carapace"
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ module github.com/reeflective/console
go 1.23.6

require (
github.com/carapace-sh/carapace v1.7.1
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/reeflective/readline v1.1.2
github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.6
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
mvdan.cc/sh/v3 v3.7.0
)

require (
github.com/carapace-sh/carapace-shlex v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rsteube/carapace-shlex v0.1.1 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/term v0.29.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
16 changes: 4 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/carapace-sh/carapace v1.7.1 h1:GjMjPNEMHhTstneZD2M3Ypjb+lW5YNEV1AfYmRhsG4c=
github.com/carapace-sh/carapace v1.7.1/go.mod h1:fHdo3nEFe1QnIXxeA/Z1O9dCI83sfCsKfxrogpHfgtM=
github.com/carapace-sh/carapace-shlex v1.0.1 h1:ww0JCgWpOVuqWG7k3724pJ18Lq8gh5pHQs9j3ojUs1c=
github.com/carapace-sh/carapace-shlex v1.0.1/go.mod h1:lJ4ZsdxytE0wHJ8Ta9S7Qq0XpjgjU0mdfCqiI2FHx7M=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/frankban/quicktest v1.14.5 h1:dfYrrRyLtiqT9GyKXgdh+k4inNeTvmGbuSgZ3lx3GhA=
github.com/frankban/quicktest v1.14.5/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
Expand All @@ -15,22 +18,13 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/reeflective/readline v1.0.15 h1:uB/M1sAc2yZGO14Ujgr/imLwQXqGdOhDDWAEHF+MBaE=
github.com/reeflective/readline v1.0.15/go.mod h1:3iOe/qyb2jEy0KqLrNlb/CojBVqxga9ACqz/VU22H6A=
github.com/reeflective/readline v1.1.1 h1:gplCdkwknFmly5BFBwVFJnMmQ/nWMrQvtkk7HizvGV0=
github.com/reeflective/readline v1.1.1/go.mod h1:CwNkh9BmFBBCSO6mdDaNWb34rOqQsI9eYbxyqvOEazY=
github.com/reeflective/readline v1.1.2 h1:XhnNwVg7gQhrxk2cJ3/taU7KKPXEc9bCzl5oHrSi7aI=
github.com/reeflective/readline v1.1.2/go.mod h1:CwNkh9BmFBBCSO6mdDaNWb34rOqQsI9eYbxyqvOEazY=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97 h1:3RPlVWzZ/PDqmVuf/FKHARG5EMid/tl7cv54Sw/QRVY=
github.com/rogpeppe/go-internal v1.10.1-0.20230524175051-ec119421bb97/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69 h1:ctOUuKn5PO6VtwtaS7unNrm6u20YXESPtnKEie/u304=
github.com/rsteube/carapace v0.46.3-0.20231214181515-27e49f3c3b69/go.mod h1:4ZC5bulItu9t9sZ5yPcHgPREd8rPf274Q732n+wfl/o=
github.com/rsteube/carapace-shlex v0.1.1 h1:fRQEBBKyYKm4TXUabm4tzH904iFWSmXJl3UZhMfQNYU=
github.com/rsteube/carapace-shlex v0.1.1/go.mod h1:zPw1dOFwvLPKStUy9g2BYKanI6bsQMATzDMYQQybo3o=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
Expand All @@ -40,8 +34,6 @@ golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down

0 comments on commit c24827d

Please sign in to comment.