@thegetty/quire-cli 1.0.0-rc.38 → 1.0.0-rc.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/main.js CHANGED
@@ -34,7 +34,14 @@ Output Modes:
34
34
 
35
35
  Set defaults: quire settings set verbose true
36
36
 
37
+ Paging:
38
+ --no-pager Disable paging for long output
39
+ NO_PAGER=1 Disable paging via environment variable
40
+ PAGER=cat Traditional Unix alternative (passes output through)
41
+
37
42
  Environment Variables:
43
+ NO_PAGER=1 Disable paging for long output
44
+ PAGER=<program> Set pager program (default: less). Use PAGER=cat to disable
38
45
  DEBUG=quire:* Enable debug output for all modules
39
46
  DEBUG=quire:lib:pdf Enable debug output for PDF module only
40
47
  DEBUG=quire:lib:* Enable debug output for all lib modules
@@ -49,7 +56,7 @@ Examples:
49
56
  /**
50
57
  * Quire CLI implements the command pattern.
51
58
  *
52
- * The `main` module acts as the _receiver_, parsing input from the client,
59
+ * The \`main\` module acts as the _receiver_, parsing input from the client,
53
60
  * calling the appropriate command module(s), managing messages between modules,
54
61
  * and sending formatted messages to the client for display.
55
62
  */
@@ -62,6 +69,7 @@ program
62
69
  .addOption(arrayToOption(quietOption))
63
70
  .addOption(arrayToOption(verboseOption))
64
71
  .addOption(arrayToOption(debugOption))
72
+ .option('--no-pager', 'disable paging for long output')
65
73
  .addHelpText('after', mainHelpText)
66
74
  .configureHelp({
67
75
  helpWidth: 80,
@@ -92,6 +100,11 @@ program.hook('preAction', (thisCommand) => {
92
100
  if (opts.debug ?? config.get('debug')) {
93
101
  enableDebug('quire:*')
94
102
  }
103
+
104
+ // --no-pager sets pager to false; propagate via env var for pager utility
105
+ if (opts.pager === false) {
106
+ process.env.NO_PAGER = '1'
107
+ }
95
108
  })
96
109
 
97
110
  /**