Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readline command & format #28

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions commands/readline/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
"os"
"strings"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
)

// Bind returns a command named `bind`, for manipulating readline keymaps and bindings.
Expand Down
3 changes: 2 additions & 1 deletion commands/readline/commands.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package readline

import (
"github.com/reeflective/readline"
"github.com/spf13/cobra"

"github.com/reeflective/readline"
)

// Commands returns a command named `readline`, with subcommands dedicated
Expand Down
5 changes: 3 additions & 2 deletions commands/readline/completers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import (
"fmt"
"strings"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
"github.com/rsteube/carapace"
"github.com/spf13/cobra"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
)

func completeKeymaps(sh *readline.Shell, _ *cobra.Command) carapace.Action {
Expand Down
3 changes: 2 additions & 1 deletion commands/readline/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import (
"sort"
"strings"

"github.com/spf13/cobra"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
"github.com/spf13/cobra"
)

const (
Expand Down
7 changes: 4 additions & 3 deletions commands/readline/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ import (
"strconv"
"strings"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
"github.com/spf13/cobra"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"

"github.com/reeflective/readline"
"github.com/reeflective/readline/inputrc"
)

var (
// We here must assume that all bind changes during the lifetime
// of the binary are all made by a single readline application.
// This config only stores the vars/binds that have been changed.
cfgChanged = inputrc.Config{}
cfgChanged = inputrc.NewConfig()
)

// Set returns a command named `set`, for manipulating readline global options.
Expand Down
3 changes: 2 additions & 1 deletion completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (
"unicode"
"unicode/utf8"

"github.com/reeflective/readline"
"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
"github.com/rsteube/carapace/pkg/xdg"

"github.com/reeflective/readline"
)

func (c *Console) complete(line []rune, pos int) readline.Completions {
Expand Down
3 changes: 2 additions & 1 deletion menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"sync"
"text/template"

"github.com/reeflective/readline"
"github.com/spf13/cobra"

"github.com/reeflective/readline"
)

// Menu - A menu is a simple way to seggregate commands based on
Expand Down