Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Direct insert not working on Linux Mint

オープン
#86 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
shell
領域
cli

調査の方向性

Start at the ./gh-md-toc entry point, search for the grep condition that checks the and markers, and inspect line 178 where no_backup is tested. Verify the --insert path against a README.md containing both markers, then exercise the no-backup option and confirm neither shell error occurs.

索引モデルが issue の本文から書いたものです。

説明

bug

I was using the direct insert flag --insert to directly insert the TOC into the readme.md. I've added the two lines

<!--ts-->
<!--te-->

into the readme but when running the script with the --insert flag I get the output:

You don't have <!--ts--> or <!--te--> in your file...exiting

I've found the part in the script that does the search for the tags

 if grep -Fxq "<!--ts-->" $gh_src && grep -Fxq "<!--te-->" $gh_src; then

which seems to fail. I've run the command manually on Linux Mint 19

grep -Fxq "<!--ts-->" Readme.md

and I get the error

bash: !-: event not found

For my workaround I had to escape the syntax to this form

if grep -xq "<\!--ts-->" $gh_src && grep -xq "<\!--te-->" $gh_src; then

Line 178 returns the following error

./gh-md-toc: line 178: [: =: unary operator expected```

should probably be changed to

 if [ "$no_backup" = "yes" ]; then
主要言語
Shell
スター
3.3k
フォーク
2.7k
平均マージ
7分
マージ済み PR(30日)
3

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ekalinin/github-markdown-toc のほかの issue

ekalinin/github-markdown-toc の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

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

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