fix go mod
This commit is contained in:
parent
b9ab36ebe2
commit
a962cc8abe
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -8,15 +8,15 @@ next release.
|
|||
|
||||
### What's new?
|
||||
|
||||
* Add `prompt.FuzzyFilter` for fuzzy matching at [#92](https://github.com/c-bata/go-prompt/pull/92).
|
||||
* Add `OptionShowCompletionAtStart` to show completion at start at [#100](https://github.com/c-bata/go-prompt/pull/100).
|
||||
* Add `prompt.NewStderrWriter` at [#102](https://github.com/c-bata/go-prompt/pull/102).
|
||||
* Add `prompt.FuzzyFilter` for fuzzy matching at [#92](https://git.tcp.direct/tcp.direct/go-prompt/pull/92).
|
||||
* Add `OptionShowCompletionAtStart` to show completion at start at [#100](https://git.tcp.direct/tcp.direct/go-prompt/pull/100).
|
||||
* Add `prompt.NewStderrWriter` at [#102](https://git.tcp.direct/tcp.direct/go-prompt/pull/102).
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix resetting display attributes (please see [pull #104](https://github.com/c-bata/go-prompt/pull/104) for more details).
|
||||
* Fix error handling of Flush function in ConsoleWriter (please see [pull #97](https://github.com/c-bata/go-prompt/pull/97) for more details).
|
||||
* Fix panic problem when reading from stdin before starting the prompt (please see [issue #88](https://github.com/c-bata/go-prompt/issues/88) for more details).
|
||||
* Fix resetting display attributes (please see [pull #104](https://git.tcp.direct/tcp.direct/go-prompt/pull/104) for more details).
|
||||
* Fix error handling of Flush function in ConsoleWriter (please see [pull #97](https://git.tcp.direct/tcp.direct/go-prompt/pull/97) for more details).
|
||||
* Fix panic problem when reading from stdin before starting the prompt (please see [issue #88](https://git.tcp.direct/tcp.direct/go-prompt/issues/88) for more details).
|
||||
|
||||
### Removed or Deprecated
|
||||
|
||||
|
@ -28,7 +28,7 @@ next release.
|
|||
|
||||
* Support CJK(Chinese, Japanese and Korean) and Cyrillic characters.
|
||||
* Add OptionCompletionWordSeparator(x string) to customize insertion points for completions.
|
||||
* To support this, text query functions by arbitrary word separator are added in Document (please see [here](https://github.com/c-bata/go-prompt/pull/79) for more details).
|
||||
* To support this, text query functions by arbitrary word separator are added in Document (please see [here](https://git.tcp.direct/tcp.direct/go-prompt/pull/79) for more details).
|
||||
* Add FilePathCompleter to complete file path on your system.
|
||||
* Add option to customize ascii code key bindings.
|
||||
* Add GetWordAfterCursor method in Document.
|
||||
|
@ -61,8 +61,8 @@ next release.
|
|||
### Fixed
|
||||
|
||||
* Fix the behavior of `Ctrl+W` keybind.
|
||||
* Fix the panic because when running on a docker container (please see [here](https://github.com/c-bata/go-prompt/pull/32) for details).
|
||||
* Fix panic when making terminal window small size after input 2 lines of texts. See [here](https://github.com/c-bata/go-prompt/issues/37) for details).
|
||||
* Fix the panic because when running on a docker container (please see [here](https://git.tcp.direct/tcp.direct/go-prompt/pull/32) for details).
|
||||
* Fix panic when making terminal window small size after input 2 lines of texts. See [here](https://git.tcp.direct/tcp.direct/go-prompt/issues/37) for details).
|
||||
* And also fixed many bugs that layout is broken when using Terminal.app, GNU Terminal and a Goland(IntelliJ).
|
||||
|
||||
### News
|
||||
|
|
14
README.md
14
README.md
|
@ -1,9 +1,9 @@
|
|||
# go-prompt
|
||||
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/c-bata/go-prompt)](https://goreportcard.com/report/github.com/c-bata/go-prompt)
|
||||
[![Go Report Card](https://goreportcard.com/badge/git.tcp.direct/tcp.direct/go-prompt)](https://goreportcard.com/report/git.tcp.direct/tcp.direct/go-prompt)
|
||||
![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)
|
||||
[![GoDoc](https://godoc.org/github.com/c-bata/go-prompt?status.svg)](https://godoc.org/github.com/c-bata/go-prompt)
|
||||
![tests](https://github.com/c-bata/go-prompt/workflows/tests/badge.svg)
|
||||
[![GoDoc](https://godoc.org/git.tcp.direct/tcp.direct/go-prompt?status.svg)](https://godoc.org/git.tcp.direct/tcp.direct/go-prompt)
|
||||
![tests](https://git.tcp.direct/tcp.direct/go-prompt/workflows/tests/badge.svg)
|
||||
|
||||
A library for building powerful interactive prompts inspired by [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit),
|
||||
making it easier to build cross-platform command line tools using Go.
|
||||
|
@ -13,7 +13,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/c-bata/go-prompt"
|
||||
"git.tcp.direct/tcp.direct/go-prompt"
|
||||
)
|
||||
|
||||
func completer(d prompt.Document) []prompt.Suggest {
|
||||
|
@ -65,7 +65,7 @@ func main() {
|
|||
|
||||
### Flexible options
|
||||
|
||||
go-prompt provides many options. Please check [option section of GoDoc](https://godoc.org/github.com/c-bata/go-prompt#Option) for more details.
|
||||
go-prompt provides many options. Please check [option section of GoDoc](https://godoc.org/git.tcp.direct/tcp.direct/go-prompt#Option) for more details.
|
||||
|
||||
[![options](https://github.com/c-bata/assets/raw/master/go-prompt/prompt-options.png)](#flexible-options)
|
||||
|
||||
|
@ -109,8 +109,8 @@ We have confirmed go-prompt works fine in the following terminals:
|
|||
## Links
|
||||
|
||||
* [Change Log](./CHANGELOG.md)
|
||||
* [GoDoc](http://godoc.org/github.com/c-bata/go-prompt)
|
||||
* [gocover.io](https://gocover.io/github.com/c-bata/go-prompt)
|
||||
* [GoDoc](http://godoc.org/git.tcp.direct/tcp.direct/go-prompt)
|
||||
* [gocover.io](https://gocover.io/git.tcp.direct/tcp.direct/go-prompt)
|
||||
|
||||
## Author
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
)
|
||||
|
||||
func executor(t string) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"path"
|
||||
"strings"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
)
|
||||
|
||||
type RequestContext struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
)
|
||||
|
||||
var LivePrefixState struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
)
|
||||
|
||||
func executor(in string) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
)
|
||||
|
||||
func completer(in prompt.Document) []prompt.Suggest {
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
"github.com/c-bata/go-prompt/completer"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/completer"
|
||||
)
|
||||
|
||||
var filePathCompleter = completer.FilePathCompleter{
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"fmt"
|
||||
"syscall"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
"github.com/c-bata/go-prompt/internal/term"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/term"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package prompt
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
)
|
||||
|
||||
// Buffer emulates the console buffer.
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
prompt "git.tcp.direct/tcp.direct/go-prompt"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -3,7 +3,7 @@ package prompt
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
runewidth "github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/bisect"
|
||||
istrings "github.com/c-bata/go-prompt/internal/strings"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/bisect"
|
||||
istrings "git.tcp.direct/tcp.direct/go-prompt/internal/strings"
|
||||
runewidth "github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ func TestDocument_DisplayCursorPosition(t *testing.T) {
|
|||
// If you're facing test failure on this test case and your terminal is iTerm2,
|
||||
// please check 'Profile -> Text' configuration. 'Use Unicode version 9 widths'
|
||||
// must be checked.
|
||||
// https://github.com/c-bata/go-prompt/pull/99
|
||||
// https://git.tcp.direct/tcp.direct/go-prompt/pull/99
|
||||
document: &Document{
|
||||
Text: "Добрый день",
|
||||
cursorPosition: 3,
|
||||
|
|
2
emacs.go
2
emacs.go
|
@ -1,6 +1,6 @@
|
|||
package prompt
|
||||
|
||||
import "github.com/c-bata/go-prompt/internal/debug"
|
||||
import "git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
|
||||
/*
|
||||
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/c-bata/go-prompt
|
||||
module git.tcp.direct/tcp.direct/go-prompt
|
||||
|
||||
go 1.14
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ package prompt
|
|||
import (
|
||||
"syscall"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/term"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/term"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/bisect"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/bisect"
|
||||
)
|
||||
|
||||
func Example() {
|
||||
|
|
|
@ -3,7 +3,7 @@ package strings_test
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/strings"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/strings"
|
||||
)
|
||||
|
||||
func ExampleIndexNotByte() {
|
||||
|
|
|
@ -214,7 +214,7 @@ func (w *VT100Writer) SetColor(fg, bg Color, bold bool) {
|
|||
w.SetDisplayAttributes(fg, bg, DisplayBold)
|
||||
} else {
|
||||
// If using `DisplayDefualt`, it will be broken in some environment.
|
||||
// Details are https://github.com/c-bata/go-prompt/pull/85
|
||||
// Details are https://git.tcp.direct/tcp.direct/go-prompt/pull/85
|
||||
w.SetDisplayAttributes(fg, bg, DisplayReset)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
)
|
||||
|
||||
// Executor is called when user input something text.
|
||||
|
|
|
@ -3,7 +3,7 @@ package prompt
|
|||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
runewidth "github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
)
|
||||
|
||||
func (p *Prompt) handleSignals(exitCh chan int, winSizeCh chan *WinSize, stop chan struct{}) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/c-bata/go-prompt/internal/debug"
|
||||
"git.tcp.direct/tcp.direct/go-prompt/internal/debug"
|
||||
)
|
||||
|
||||
func (p *Prompt) handleSignals(exitCh chan int, winSizeCh chan *WinSize, stop chan struct{}) {
|
||||
|
|
Loading…
Reference in New Issue