OSDN Git Service

For debugfs, use the "more" pager in preference to "less",
authorTheodore Ts'o <tytso@mit.edu>
Sat, 24 Jan 2004 23:54:41 +0000 (18:54 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 24 Jan 2004 23:54:41 +0000 (18:54 -0500)
since "less" doesn't work terribly well for debugfs's purpose.

Document the DEBUGFS_PAGER and PAGER environment variables.

RELEASE-NOTES
debugfs/ChangeLog
debugfs/debugfs.8.in
debugfs/util.c

index 6f1ac91..59a7b76 100644 (file)
@@ -64,7 +64,7 @@ correct mode bits.  (Addresses Debian Bug: #217456)
  
 If the environment variables DEBUFS_PAGER and PAGER are not set,
 debugfs now searches for the appropriate pager to use, beginning with
-/usr/bin/pager, and then falling back to 'less' and 'more'.
+/usr/bin/pager, and then falling back to 'more' and 'less'.
 (Addresses Debian Bug: #221977)
 
 Fix regression tests so they work correctly when e2fsprogs is compiled
index 4ca40ed..92b0d99 100644 (file)
@@ -1,3 +1,12 @@
+2004-01-24  Theodore Ts'o  <tytso@mit.edu>
+
+       * debugfs.8.in: Document the PAGER and DEBUGFS_PAGER environment
+               variables.
+
+       * util.c (open_pager): Use the "more" pager in preference to
+               "less", since "less" doesn't work terribly well for
+               debugfs's purpose.
+
 2003-12-25  Theodore Ts'o  <tytso@mit.edu>
 
        * util.c (open_pager): Try to use the DEBUGFS_PAGER environment
index 3cc0f96..944327b 100644 (file)
@@ -434,6 +434,36 @@ Create a file in the filesystem named
 and copy the contents of
 .I source_file
 into the destination file.
+.SH ENVIRONMENT VARIABLES
+.TP
+.B DEBUGFS_PAGER, PAGER
+The
+.BR debugfs (8)
+program always pipes the output of the some commands through a
+pager program.  These commands include: 
+.IR show_super_stats ,
+.IR list_directory ,
+.IR show_inode_info ,
+.IR list_deleted_inodes ,
+and
+.IR htree_dump .
+The specific pager can explicitly specified by the
+.B DEBUGFS_PAGER
+environment variable, and if it is not set, by the
+.B PAGER
+environment variable.  
+.IP
+Note that since a pager is always used, the 
+.BR less (1)
+pager is not particularly appropriate, since it clears the screen before
+displaying the output of the command and clears the output the screen
+when the pager is exited.  Many users prefer to use the 
+.BR less (1)
+pager for most purposes, which is why the 
+.B DEBUGFS_PAGER 
+environment variable is available to override the more general
+.B PAGER
+environment variable.
 .SH AUTHOR
 .B debugfs
 was written by Theodore Ts'o <tytso@mit.edu>.
index 4da7f6e..93ef751 100644 (file)
@@ -56,7 +56,7 @@ void reset_getopt(void)
 #endif
 }
 
-static const char *pager_search_list[] = { "pager", "less", "more", 0 };
+static const char *pager_search_list[] = { "pager", "more", "less", 0 };
 static const char *pager_dir_list[] = { "/usr/bin", "/bin", 0 };
 
 static const char *find_pager(char *buf)