aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sh/.local
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-08-01 14:51:36 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-08-01 14:51:36 -0500
commit87620a4262a949086d6df029e84ccf9cbb9740c8 (patch)
tree7c898529047d7f5fbfdf1e2a958e85f630e4d77b /sh/.local
parent22bd20ea104cef71ffda66ac6e44a0d41cbd4418 (diff)
perf(tmux): simplify and speed up tmux-projectr
Diffstat (limited to 'sh/.local')
-rwxr-xr-xsh/.local/bin/lessfilter7
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