aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-07-02 00:38:58 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-07-02 00:38:58 +1200
commit610d194384cc9ab20431bf7212653d1679280c35 (patch)
tree47af090aebbaeac04ba7aaaddda88b383869d3f4 /bin
parentInline two lines in jfcd(1) (diff)
downloaddotfiles-610d194384cc9ab20431bf7212653d1679280c35.tar.gz
dotfiles-610d194384cc9ab20431bf7212653d1679280c35.zip
Use terser arg noodling in tl(1)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tl6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/tl b/bin/tl
index 105d1dd0..bac7350f 100755
--- a/bin/tl
+++ b/bin/tl
@@ -55,12 +55,10 @@ done
shift "$((OPTIND-1))"
# Need at least one tag
-if ! (($#)) ; then
- set /dev/stdin
-fi
+(($#)) || set /dev/stdin
# Print each line as we read it, prepending the tags, separated by spaces
-for file in "$@" ; do
+for file ; do
while IFS= read -r line ; do
printf '%s%s%s\n' "$prefix" "$line" "$suffix"
done < "$file"