From f7731dd84775ac1036338599e3c6b9bc02976b89 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Sun, 15 Sep 2024 13:42:50 -0400 Subject: Fix missing line count by setting default --- scripts/preview | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/preview') 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") -- cgit v1.2.3