Question: How pty behaives with empty command.
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 15/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
まず test_no_cmd 関数と PtyProcess::new(Command::new("")) の呼び出しから始め、その後、repository の pty/tty 処理とターミナルのエコー動作を調べてください。空のコマンドの影響を含め、エコーされた文字列が表示される理由を明確に説明できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I was tinkering pty/tty stuff and still not clearly understand how it works :). And you're @philippkeller the most right person who I could address this question. Example below.
Currently this test will pass.
But why?
Why we get this echoed strings?
I've tested the flags.local_flags &= !termios::LocalFlags::ECHO works fine.
Thanks in advance.
#[test]
/// Open cat, write string, read back string twice, send Ctrl^C and check that cat exited
fn test_no_cmd() {
// wrapping into closure so I can use ?
|| -> std::io::Result<()> {
let process = PtyProcess::new(Command::new("")).expect("could not execute cat");
let f = process.get_file_handle();
let mut writer = LineWriter::new(&f);
let mut reader = BufReader::new(&f);
writer.write_all(b"hello cat\n")?;
let mut buf = String::new();
reader.read_line(&mut buf)?;
assert_eq!(buf, "hello cat\r\n");
Ok(())
}()
.unwrap_or_else(|e| panic!("test_cat failed: {}", e));
}
- 主要言語
- Rust
- スター
- 391
- フォーク
- 69
- 平均マージ
- 1日 34分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-cli/rexpect のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
Configurable sleeps オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
rust-cli/rexpect の issue をすべて見る
似ている issue
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
n0-computer/iroh#4550 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
paritytech/zombienet-sdk#591 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
farion1231/cc-switch#7638 · コメント 1 件 ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100