aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-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")