feat: pager

This commit is contained in:
2023-10-23 14:58:24 -04:00
parent 4b6a577907
commit 36813854c9

15
.config/zsh/pager.zsh Normal file
View File

@@ -0,0 +1,15 @@
function p () {
local pager="$PAGER"
if [ -n "$pager" ]; then
if command -v "$pager" &>/dev/null; then
$PAGER
fi
else
if command -v less &>/dev/null; then
less -R
else
cat
fi
fi
}