xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

how to use vscode to fix Linux pbcopy command garbled bug All In One

how to use vscode to fix Linux pbcopy command garbled bug All In One

pbcopy 命令乱码 bug ❌

image

Linux pbcopy command garbled bug

macOS man command garbled bug

# man bug ❌ 没有使用 pbcopy
$ man grep > man-grep.md

$ code .

image

error ❌

whitespace error ???

$ man grep | pbcopy

https://stackoverflow.com/questions/ask

https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-11/msg01173.html

solutions

# 输出到文件,避免 man 分页问题
$ man grep >> man-grep.md
# 手动复制 cat ✅
$  cat man-grep.md

# 都不好使,pbcopy 乱码  bug ❌
$  cat man-grep.md | pbcopy

$  man grep | pbcopy

image

use vscode to fix copy from terminal encoding bug 🚀

vscode 全部选中 " 符号,连续两次删除后,保存即可!✅

# step 1, output
$ man shutdown > shutdown.md

# step 2, fix duplicate symbols
# vscode 全部选中 `"` 符号,连续两次删除后,保存即可!✅

image

refs

https://stackoverflow.com/questions/74505387/is-this-a-pbcopy-command-garbled-bug

https://github.com/xgqfrms/linux/issues/21#issuecomment-1319017550

Linux grep command All In One

https://www.cnblogs.com/xgqfrms/p/16900167.html#5125418



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2022-11-20 10:08  xgqfrms  阅读(30)  评论(4编辑  收藏  举报