abiosoft / abiosoft/ishell

Print doesn't display text if string doesn't end with '\n'

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

`fmt.Printf` doesn't work when there is no new-line character at the end of the string.

```go
// This works fine
shell.AddCmd(&ishell.Cmd{
Name: "hello",
Func: func(c *ishell.Context) {
fmt.Printf("Hello\n")
},
})

// This does not
shell.AddCmd(&ishell.Cmd{
Name: "hello",
Func: func(c *ishell.Context) {
fmt.Printf("Hello")
},
})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.