abiosoft / abiosoft/ishell

Extraneous space for multiline args

オープン
#132 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
1.8k
フォーク
213
PR マージ指標
30日以内にマージされた PR はありません

説明

First and foremost, thanks for this project! I've been using it successfully in my [AWS Parameter Store shell project](https://github.com/bwhaley/ssmsh).

I've noticed that an extraneous space is added in values with new lines. Here's a reproducible example:

```
package main

import (
"github.com/abiosoft/ishell"
)

func main() {
shell := ishell.New()
shell.AddCmd(&ishell.Cmd{
Name: "test",
Func: func(c *ishell.Context) {
shell.Printf("Got: '%x'\n", c.Args[0])
},
})
shell.Run()
}
```

```
>>> test "foo\
... bar"
Got: '666f6f200a626172'
```

In the hex output we see:
```
666f6f - foo
200a -
626172 - bar
```

The space here is unexpected. I did start looking through the code here but ran out of time before I figured out where it was happening.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。