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

Not friendly to non ascii characters #143

Open
josedelinux opened this issue Jul 17, 2021 · 1 comment
Open

Not friendly to non ascii characters #143

josedelinux opened this issue Jul 17, 2021 · 1 comment

Comments

@josedelinux
Copy link

hello.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"

@fy0
Copy link

fy0 commented Sep 2, 2022

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants