From b28f9f8c4f484eb78c8a80285b57e9a7cdb7b14b Mon Sep 17 00:00:00 2001 From: Christian Winther Date: Tue, 18 Feb 2025 21:23:10 +0100 Subject: [PATCH] chore: update the github org owning 'carapace' --- README.md | 18 +++++++++--------- commands/readline/bind.go | 4 ++-- commands/readline/completers.go | 2 +- commands/readline/set.go | 4 ++-- completer.go | 8 ++++---- example/main-commands.go | 2 +- go.mod | 5 ++--- go.sum | 16 ++++------------ 8 files changed, 25 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index c1c773f..0e69b3d 100644 --- a/README.md +++ b/README.md @@ -40,15 +40,15 @@

-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. @@ -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 @@ -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) @@ -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. diff --git a/commands/readline/bind.go b/commands/readline/bind.go index dca0eb2..945b10a 100644 --- a/commands/readline/bind.go +++ b/commands/readline/bind.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/rsteube/carapace" + "github.com/carapace-sh/carapace" "github.com/spf13/cobra" "github.com/reeflective/readline" @@ -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. diff --git a/commands/readline/completers.go b/commands/readline/completers.go index d199852..8069354 100644 --- a/commands/readline/completers.go +++ b/commands/readline/completers.go @@ -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" diff --git a/commands/readline/set.go b/commands/readline/set.go index 53c66ad..cd8c960 100644 --- a/commands/readline/set.go +++ b/commands/readline/set.go @@ -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" diff --git a/completer.go b/completer.go index 2f26be8..7d72613 100644 --- a/completer.go +++ b/completer.go @@ -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" ) diff --git a/example/main-commands.go b/example/main-commands.go index d545199..884787c 100644 --- a/example/main-commands.go +++ b/example/main-commands.go @@ -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" diff --git a/go.mod b/go.mod index b6b32d6..9778bf7 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,9 @@ 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 @@ -13,11 +13,10 @@ require ( ) 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 ) diff --git a/go.sum b/go.sum index 176fad9..7173de6 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= @@ -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=