We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
c
1 parent f5219c5 commit d3224b5Copy full SHA for d3224b5
bin/c
@@ -122,7 +122,7 @@ readonly keep_eol quiet target_command
122
# biz logic
123
################################################################################
124
125
-copy() {
+systemClip() {
126
case "$(uname)" in
127
Darwin*)
128
pbcopy
@@ -136,21 +136,21 @@ copy() {
136
esac
137
}
138
139
-catThenCopy() {
+bufferCopy() {
140
local content
141
content=$(cat)
142
if $keep_eol; then
143
printf '%s\n' "$content"
144
else
145
printf %s "$content"
146
- fi | copy
+ fi | systemClip
147
148
149
teeAndCopy() {
150
if $quiet; then
151
- catThenCopy
+ bufferCopy
152
153
- tee >(catThenCopy)
+ tee >(bufferCopy)
154
fi
155
156
0 commit comments