Skip to content

Commit

Permalink
refactor(c): rename functions 🔡
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Feb 18, 2024
1 parent f5219c5 commit d3224b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ readonly keep_eol quiet target_command
# biz logic
################################################################################

copy() {
systemClip() {
case "$(uname)" in
Darwin*)
pbcopy
Expand All @@ -136,21 +136,21 @@ copy() {
esac
}

catThenCopy() {
bufferCopy() {
local content
content=$(cat)
if $keep_eol; then
printf '%s\n' "$content"
else
printf %s "$content"
fi | copy
fi | systemClip
}

teeAndCopy() {
if $quiet; then
catThenCopy
bufferCopy
else
tee >(catThenCopy)
tee >(bufferCopy)
fi
}

Expand Down

0 comments on commit d3224b5

Please sign in to comment.