How to copy tab-delimited text to clipboard from within a unix shell while preserving the tabs?

ⅰ亾dé卋堺 提交于 2019-12-07 06:27:17

问题


I am trying to copy and paste a few lines of a file from within a UNIX environment into a webpage. I want to preserve the original formatting with disrupting the tabs. However, when I select a block of text and copy and paste it into a webpage, all of the tabs have been converted to various length runs of spaces.

Can someone please tell me what I can do to preserve the original tabs? It needs to be as simple as possible so that newbie users can do the same!

Thanks


回答1:


Based on your comment that the text that you're copying is missing the tabs, I suspect that the ptty you're using has converted them for you. I suspect if you run "stty tabs", you may get the behavior you're looking for (by disabling tab expansion in the ptty).



来源:https://stackoverflow.com/questions/19285925/how-to-copy-tab-delimited-text-to-clipboard-from-within-a-unix-shell-while-prese

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!