mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-21 04:07:47 +02:00
Revert "lib: Remove unused function in pager lib"
This reverts commit 309a2169ba7bc30c7e370f8d06df6dd59ff5515c.
This commit is contained in:
parent
d5fa65132d
commit
d29915f141
18
lib/pager.sh
18
lib/pager.sh
@ -47,6 +47,24 @@ pager_exec() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Displays the output of a command or function inside the pager (if it exists).
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# bat | pager_display
|
||||||
|
pager_display() {
|
||||||
|
if [[ -n "$SCRIPT_PAGER_CMD" ]]; then
|
||||||
|
if [[ -n "$SCRIPT_PAGER_CMD" ]]; then
|
||||||
|
"${SCRIPT_PAGER_CMD[@]}" "${SCRIPT_PAGER_ARGS[@]}"
|
||||||
|
return $?
|
||||||
|
else
|
||||||
|
"${SCRIPT_PAGER_CMD[@]}"
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cat
|
||||||
|
return $?
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user