Skip to content

Commit 13f86d8

Browse files
committed
cat-which: Reject if no arguments
1 parent 572e02b commit 13f86d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/cat-which

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
# Not a plain text: /bin/zsh
1616
# ```
1717

18+
if [[ $1 == '' ]] ; then
19+
echo 'Error: 1 or more arguments required' > /dev/stderr
20+
exit 1
21+
fi
22+
1823
dir=$(dirname "$0")
1924

2025
# shellcheck disable=SC1091

0 commit comments

Comments
 (0)