Skip to content

Commit af3bcb5

Browse files
committed
feat(c): ensure use command on path 👣
1 parent 96bb69c commit af3bcb5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

bin/c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Run command and put output to system clipper.
44
#
55
# @Usage
6-
# $ c echo 'hello world!'
7-
# $ echo 'hello world!' | c
6+
# $ c ls -l
7+
# $ ls -l | c
8+
# $ c -q < ~/.ssh/id_rsa.pub
89
#
910
# @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-c
1011
# @author Jerry Lee (oldratlee at gmail dot com)
@@ -41,7 +42,6 @@ Run command and put output to system clipper.
4142
If no command is specified, read from stdin(pipe).
4243
4344
Example:
44-
$PROG echo "hello world!"
4545
$PROG grep -i 'hello world' menu.h main.c
4646
set | $PROG
4747
$PROG -q < ~/.ssh/id_rsa.pub
@@ -141,5 +141,5 @@ teeAndCopy() {
141141
if ((${#target_command[@]} == 0)); then
142142
teeAndCopy
143143
else
144-
"${target_command[@]}" | teeAndCopy
144+
command "${target_command[@]}" | teeAndCopy
145145
fi

docs/shell.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ Run command and put output to system clipper.
9898
If no command is specified, read from stdin(pipe).
9999

100100
Example:
101-
c echo "hello world!"
102101
c grep -i 'hello world' menu.h main.c
103102
set | c
104103
c -q < ~/.ssh/id_rsa.pub

0 commit comments

Comments
 (0)