sh: Add tidy-viewer alias tv

Added alias tv which displays a csv(/tsv..) file piped into the pager so
it can have any dimensions and be scrolled through.
This commit is contained in:
Marty Oehme 2023-02-11 16:11:53 +01:00
parent 4eb6ac772b
commit e5b3f029b2
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -107,6 +107,8 @@ if exist imv-folder; then
} }
else else
for cmd in imv nsxiv vimiv sxiv feh; do for cmd in imv nsxiv vimiv sxiv feh; do
# shellcheck disable=SC2139
# since we *want* it defined at definition
if exist "$cmd"; then alias iv="$cmd"; break; fi if exist "$cmd"; then alias iv="$cmd"; break; fi
done done
fi fi
@ -128,3 +130,9 @@ fi
if exist sc-im; then if exist sc-im; then
alias sc=sc-im alias sc=sc-im
fi fi
if exist tidy-viewer; then
tv() {
tidy-viewer -a -e "$@" | less -S -R
}
fi