diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2024-09-15 13:42:50 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2024-09-15 13:42:50 -0400 |
| commit | f7731dd84775ac1036338599e3c6b9bc02976b89 (patch) | |
| tree | 46365f51157bc4b5cebed1358e28d80f2904db93 | |
| parent | 98148613d021e32d5db4a0238aaebc0fc795bb0a (diff) | |
Fix missing line count by setting default
| -rwxr-xr-x | scripts/preview | 4 |
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") |
