mirror of
https://github.com/tedkulp/dotfiles
synced 2026-03-05 13:40:18 -05:00
feat: pager
This commit is contained in:
15
.config/zsh/pager.zsh
Normal file
15
.config/zsh/pager.zsh
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user