abiosoft / abiosoft/ishell

Not friendly to non ascii characters

Offen
#143 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
1.8k
Forks
213
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

hello.go
```go
package main

import (
"strings"

"gopkg.in/abiosoft/ishell.v2"
)

func main() {
// create new shell.
// by default, new shell includes 'exit', 'help' and 'clear' commands.
shell := ishell.New()

// display welcome info.
shell.Println("Sample Interactive Shell")

// register a function for "greet" command.
shell.AddCmd(&ishell.Cmd{
Name: "greet",
Help: "greet user",
Func: func(c *ishell.Context) {
c.Println("Hello", strings.Join(c.Args, " "))
},
})

// run shell
shell.Run()
}

```

when i run it:
'''
>>> greet josé
Error: Uknown rune: 233
>>>
'''

system: windows 10

and i also tried that accents works fine with "github.com/abiosoft/readline"

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.