diff options
Diffstat (limited to 'sh/.local/bin')
-rwxr-xr-x | sh/.local/bin/lessfilter | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sh/.local/bin/lessfilter b/sh/.local/bin/lessfilter index 661a638..c0ea194 100755 --- a/sh/.local/bin/lessfilter +++ b/sh/.local/bin/lessfilter @@ -1,6 +1,11 @@ #!/bin/sh +if [ -d "$1" ]; then + onefetch --include-hidden --no-art --no-color-palette "$1" 2>/dev/null && exit 0 + tree -CL 3 --gitignore --noreport "$1" 2>/dev/null && exit 0 +fi + case "$1" in -*/rfc/txt/rfc*.txt) sed -e '1,+2d' -e '/\f/d' "$1" ;; +*/rfc/txt/rfc*.txt) sed -e '1,+2d' -e '/\f/d' "$1" && exit 0 ;; *) exit 1 ;; esac |