xsel -o equivalent for OS X

為{幸葍}努か 提交于 2020-06-25 05:36:18

问题


Is there an equivalent solution to grab selected text in OS X as 'xsel -o' works for Linux?

Just need the current selection so I can use the text in shell script.

Cheers, Erik


回答1:


You can probably install xsel on MacOS. (UPDATE: According to Arkku's comment, that will only work if you have the X11 server running and synchronized to the OS X pasteboard.)

If not, a quick Google search turns up pbcopy / pbpaste, which apparently is pre-installed.

Link: https://github.com/raymontag/keepassc/issues/59



来源:https://stackoverflow.com/questions/28857592/xsel-o-equivalent-for-os-x

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