~sourcemage/sorcery

2a4a8589bb715c8d168bdec9d5cbcbf79f6ecd92 — Jaka Kranjc 13 years ago a39313c
libsorcery: avoid passing bad parameters when PAGER has none

(cherry-picked from commit c0ff54d58b1e3c8f45b7218dd53b45fcb71bb2df)
2 files changed, 5 insertions(+), 0 deletions(-)

M ChangeLog
M var/lib/sorcery/modules/libsorcery
M ChangeLog => ChangeLog +3 -0
@@ 1,3 1,6 @@
2010-01-01 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
	* libsorcery: avoid passing bad parameters when PAGER has none

2010-12-30 Jaka Kranjc <lynxlynxlynx@sourcemage.org>
	* libsorcery: default the pager to cat if nothing is specified and less
	  is not present on the system

M var/lib/sorcery/modules/libsorcery => var/lib/sorcery/modules/libsorcery +2 -0
@@ 1663,6 1663,8 @@ function set_pager() {
  local pager_prog
  local pager_params=${PAGER#* }
  smgl_basename "${PAGER%% *}" pager_prog
  # setting PAGER to a single word would give bad parameters
  [[ $pager_prog == $PAGER ]] && unset pager_params

  # TODO: add any needed options for the rest of the pagers
  case $pager_prog in