Direct insert not working on Linux Mint
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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 内容生成。
描述
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
- 平均合并
- 1 小时 7 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ekalinin/github-markdown-toc 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 78/100
ekalinin/github-markdown-toc#176 ·
维护者通常 1 天内回复
-
Update outdated examples and versions in README可能已有人在做 @SatvikMishra08 于 17 天前认领。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 88/100
ekalinin/github-markdown-toc#165 ·
维护者通常 1 天内回复
-
[Feature] `--no-code-tag-removal` flag allowing to make removal of backticks in TOC entries optional可能已有人在做 @jofas 于 801 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 58/100
ekalinin/github-markdown-toc#153 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
ekalinin/github-markdown-toc#152 · 1 个 reaction ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 35/100
ekalinin/github-markdown-toc#141 ·
维护者通常 1 天内回复
查看 ekalinin/github-markdown-toc 的全部 Issue
相似的 Issue
-
Webcam overlay freezes during voxtype dictation while screen recording (pause_media pauses the overlay mpv)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
TYPO3BestPractices/tea#2409 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 1/5 1 小时以内 新手友好度 78/100
mattpocock/skills#1281 ·
维护者通常 1 天内回复
-
pip_install() in notebook_utils.py drops version constraints on Windows because of shell=True可能已有人在做 @prajakta128 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
openvinotoolkit/openvino_notebooks#3748 ·
维护者通常 1 天内回复
-
github_actions
难度 2/5 1-3 小时 新手友好度 62/100
hiero-ledger/hiero-consensus-node#27621 ·
维护者通常 1 天内回复