aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/preview
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-09-15 13:42:50 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-09-15 13:42:50 -0400
commitf7731dd84775ac1036338599e3c6b9bc02976b89 (patch)
tree46365f51157bc4b5cebed1358e28d80f2904db93 /scripts/preview
parent98148613d021e32d5db4a0238aaebc0fc795bb0a (diff)
Fix missing line count by setting default
Diffstat (limited to 'scripts/preview')
-rwxr-xr-xscripts/preview4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/preview b/scripts/preview
index d083e0b..e3a0172 100755
--- a/scripts/preview
+++ b/scripts/preview
@@ -3,10 +3,8 @@
path="$1"
lines="$2"
-# TODO: if lines is undefined set to 40
-# TODO: truncate long output to lines
-
[ ! -e "$path" ] && { echo "$path not found" ; exit 1; }
+[ -z "$lines" ] && lines=40
filetype=$(file -b "$path")