1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 12:35:23 +02:00
tldr/pages.zh/osx/yank.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

413 B

yank

从 stdin 读取输入并显示一个选择界面,该界面允许选择一个字段并将其复制到剪贴板.

  • 使用默认分隔符 (\f, \n, \r, \s, \t):

{{sudo dmesg}} | yank

  • 输入单行:

{{sudo dmesg}} | yank -l

  • 使用特定分 = 隔符输入:

{{echo hello=world}} | yank -d {{=}}

  • 只有与特定正则表达式匹配的内容才输入:

{{ps ux}} | yank -g "{{[0-9]+}}"