Initial commit
This commit is contained in:
commit
cefd40b6dc
31 changed files with 1028 additions and 0 deletions
14
bin/autoless
Executable file
14
bin/autoless
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/zsh
|
||||
if [[ -n "$@" ]]; then
|
||||
out=$(<"$@")
|
||||
else
|
||||
out=$(cat)
|
||||
fi
|
||||
((lim=$LINES-1))
|
||||
numlines=$(echo $out | wc -l)
|
||||
if (( $numlines > $lim ))
|
||||
then
|
||||
echo $out | less -R
|
||||
else
|
||||
echo $out
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue