abiosoft / abiosoft/ishell

Not friendly to non ascii characters

未关闭
#143 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
1.8k
派生
213
PR 合并指标
30 天内没有已合并 PR

描述

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"

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。