Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこの投稿を見ました: how-can-i-copy-the-output-of-a-command-directly-into-my-clipboard
このエイリアスを取得しました
# Redoes the last command and copies the output to clipboard alias cl="fc -e -|pbcopy"
ただし、最後のコマンドをやり直さず、最後のコマンドの出力をコピーするエイリアスまたは関数が必要です。
これを試して、
!-1 | pbcopy
またはエイリアスが必要な場合
alias cl="!-1 | pbcopy"