[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (2b971f2fb7deaec22c487b66291f7a9c21088a4f)

Jaka Kranjc scm at sourcemage.org
Thu Dec 30 11:54:34 EST 2010


GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx at sourcemage.org>:

 ChangeLog                          |    2 ++
 var/lib/sorcery/modules/libsorcery |   20 ++++++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 2b971f2fb7deaec22c487b66291f7a9c21088a4f
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    libsorcery: default the pager to cat if nothing is specified and less
          is not present on the system

diff --git a/ChangeLog b/ChangeLog
index 807a470..75ee1af 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
 	* gaze: versions show the correct grimoire when using cast -g #15745
 	* libmisc: fixed remove_files_and_dirs not removing some dirs #15804
 	  and optimised the empty dir removal a bit
+	* libsorcery: default the pager to cat if nothing is specified and less
+	  is not present on the system
 
 2010-10-19 Bor Kraljič <pyrobor at ver.si>
 	* libsummon: moved sanity check of source to right after download (#15886)
diff --git a/var/lib/sorcery/modules/libsorcery b/var/lib/sorcery/modules/libsorcery
index 2bd5aad..dbbf5ec 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1270,14 +1270,18 @@ function override_grimoires() {
 #---------------------------------------------------------------------
 function set_pager() {
   if [[ -z $PAGER ]]; then
-    # pager info
-    # -R: display color codes properly
-    # -F: quit on one-screenfull of data (otherwise scribe pauses on empty updates)
-    # -X: dont do screen init and deinit, gaze install
-    # of a small spell is effectively useless otherwise as the
-    # screen is cleared afterwards.
-    # -f: force it, since we may not be dealing with a regular file
-    PAGER="less -R -F -X -f"
+    if real_spell_ok less; then
+      # pager info
+      # -R: display color codes properly
+      # -F: quit on one-screenfull of data (otherwise scribe pauses on empty updates)
+      # -X: dont do screen init and deinit, gaze install
+      # of a small spell is effectively useless otherwise as the
+      # screen is cleared afterwards.
+      # -f: force it, since we may not be dealing with a regular file
+      PAGER="less -R -F -X -f"
+    else
+      PAGER=cat
+    fi
     return
   fi
 



More information about the SM-Commit mailing list