请问HN:为什么自述文件中仍然使用$符号来表示可复制粘贴的命令?
我在文档和自述文件中经常遇到这个问题。`$ ls -lt` 通常会显示一个可以轻松点击的复制按钮,但当你在终端粘贴时,它会显示为 `$ ls -lt`,前面的 `$` 是多余的,这会导致错误,比如 `$ command not found` 或类似的错误……难道不应该直接使用 `ls -lt` 而不在前面加上 `$` 吗?
查看原文
I often encounter this in docs/readmes
`$ ls -lt` often renders with a copy button that you can easily click and when you paste it in terminal it shows up as `$ ls -lt` with an unnecessary $ causing an error $ command not found or something like that...
wouldn't it make sense to just have `ls -lt` and not add the $ in front of it?