feat(\db-tool\): introduce unified db-tool package with postgres harness and tests (T0-T8)
This commit is contained in:
8
legacy/helper/posix-shell/pager_or_cat.sh
Normal file
8
legacy/helper/posix-shell/pager_or_cat.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
pager_or_cat_init() {
|
||||
# Pipe to pager only if stdout is a terminal, otherwise output directly
|
||||
if [ -t 1 ]; then
|
||||
PAGER_OR_CAT="${PAGER:-less}"
|
||||
else
|
||||
PAGER_OR_CAT=cat
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user