pr: --first-line-number counts lines on skipped pages
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
src/uu/pr/src/pr.rsから始めます。issue は796~802行目のオプションパーサーと、1268~1285行目のページネーションループを指しています。省略された-Nと明示的な-N1がどのように表現されるかを比較し、印刷されたページに対して行番号がいつ進むかを追ってください。示された-Nのケースの回帰テストを追加します。出力が表のGNUの結果と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
With one line per page, +2 skips the first line. The help for -N says numbering starts at the first line of the first page printed, so the line containing b should be numbered 8.
printf 'a\nb\n' | LC_ALL=C pr -t -l1 +2 -n:1 -N8
On Linux, uutils 108f21e prints 9:b. GNU coreutils 9.12 prints 8:b. Both exit 0.
There is also a distinction worth covering in a regression test:
| Last argument | GNU 9.12 | uutils 108f21e |
|---|---|---|
Omit -N |
2:b |
2:b |
-N1 |
1:b |
2:b |
-N8 |
8:b |
9:b |
The option parser stores the same starting number for an omitted -N and an explicit -N1. The pagination loop increments the line number before checking whether the page will be printed.
- 主要言語
- Rust
- スター
- 24.4k
- フォーク
- 2.2k
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 434
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
uutils/coreutils のほかの issue
-
U - shred
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
chown -v: `+ID` spec echoed verbatim on a broken symlink対応中かも @sunsss123soldier が 1 日前に担当しました。 オープンgood first issue oss-scanner U - chown
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
dircolors: --csh doesn't escape `!`対応中かも @majidninja が 2 日前に担当しました。 オープンgood first issue oss-scanner U - dircolors
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
uutils/coreutils#16496 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
dircolors: directory operand exits 2 with a custom message, GNU prints 'read error: Is a directory' and exits 1対応中かも @emirmrkaljevic が 3 日前に担当しました。 オープンU - dircolors
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
test_hostid.rs lacks test cases with frozen ip addr e.g. unshare -ru sh -c "hostname 127.0.0.1 && hostid"対応中かも @costajohnt が 3 日前に担当しました。 オープンU - hostid
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
uutils/coreutils の issue をすべて見る
似ている issue
-
ai_p2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ClickHouse/ClickHouse#132519 ·
メンテナーはふだん 1 日以内に返信
-
Pattern-clip compiler tests miss the clip cap, sort order, muted output and count/emit agreementオープンarea: engine type: test
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
YuriiMurha/grooviq#224 ·
メンテナーはふだん 1 日以内に返信
-
state:needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
zed-industries/zed#67109 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
storytold/photocraft#15500 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信