File docs/zograscope.md changed (mode: 100644) (index 91ac703..8c1796c) |
... |
... |
force colorization of output |
233 |
233 |
`--lang` _arg_ \ |
`--lang` _arg_ \ |
234 |
234 |
force specific language (`c`, `cxx`, `make`, `lua`) and disable auto-detection |
force specific language (`c`, `cxx`, `make`, `lua`) and disable auto-detection |
235 |
235 |
|
|
|
236 |
|
`--no-pager` \ |
|
237 |
|
never spawn a pager for output |
|
238 |
|
|
236 |
239 |
BEHAVIOUR |
BEHAVIOUR |
237 |
240 |
========= |
========= |
238 |
241 |
|
|
239 |
242 |
Pager |
Pager |
240 |
243 |
----- |
----- |
241 |
244 |
|
|
242 |
|
When output is a terminal (not the case when invoked by Git), `less` is spawn |
|
243 |
|
if output is about the size of the screen. |
|
|
245 |
|
By default when output is a terminal (not the case when invoked by Git), `less` |
|
246 |
|
is spawn if output is about the size of the screen. Use `--no-pager` to change |
|
247 |
|
the behaviour. |
244 |
248 |
|
|
245 |
249 |
Language detection |
Language detection |
246 |
250 |
------------------ |
------------------ |
File man/zograscope.7 changed (mode: 100644) (index 42700d8..e9b648a) |
... |
... |
force colorization of output |
334 |
334 |
.PD |
.PD |
335 |
335 |
force specific language (\f[V]c\f[R], \f[V]cxx\f[R], \f[V]make\f[R], |
force specific language (\f[V]c\f[R], \f[V]cxx\f[R], \f[V]make\f[R], |
336 |
336 |
\f[V]lua\f[R]) and disable auto-detection |
\f[V]lua\f[R]) and disable auto-detection |
|
337 |
|
.PP |
|
338 |
|
\f[V]--no-pager\f[R] |
|
339 |
|
.PD 0 |
|
340 |
|
.P |
|
341 |
|
.PD |
|
342 |
|
never spawn a pager for output |
337 |
343 |
.SH BEHAVIOUR |
.SH BEHAVIOUR |
338 |
344 |
.SS Pager |
.SS Pager |
339 |
345 |
.PP |
.PP |
340 |
|
When output is a terminal (not the case when invoked by Git), |
|
|
346 |
|
By default when output is a terminal (not the case when invoked by Git), |
341 |
347 |
\f[V]less\f[R] is spawn if output is about the size of the screen. |
\f[V]less\f[R] is spawn if output is about the size of the screen. |
|
348 |
|
Use \f[V]--no-pager\f[R] to change the behaviour. |
342 |
349 |
.SS Language detection |
.SS Language detection |
343 |
350 |
.PP |
.PP |
344 |
351 |
By default language is auto-detected based on file name. |
By default language is auto-detected based on file name. |
File src/tooling/common.cpp changed (mode: 100644) (index 98d3175..cdaa5d9) |
... |
... |
Environment::setup(const std::vector<std::string> &argv) |
66 |
66 |
args.color = varMap.count("color"); |
args.color = varMap.count("color"); |
67 |
67 |
args.fine = varMap.count("fine-only"); |
args.fine = varMap.count("fine-only"); |
68 |
68 |
args.timeReport = varMap.count("time-report"); |
args.timeReport = varMap.count("time-report"); |
|
69 |
|
args.noPager = varMap.count("no-pager"); |
69 |
70 |
args.lang = varMap["lang"].as<std::string>(); |
args.lang = varMap["lang"].as<std::string>(); |
70 |
71 |
|
|
71 |
72 |
if (args.color) { |
if (args.color) { |
72 |
73 |
decor::enableDecorations(); |
decor::enableDecorations(); |
73 |
74 |
} |
} |
|
75 |
|
|
|
76 |
|
if (args.noPager) { |
|
77 |
|
redirectToPager.discharge(); |
|
78 |
|
} |
74 |
79 |
} |
} |
75 |
80 |
|
|
76 |
81 |
// Parses command line-options. |
// Parses command line-options. |
|
... |
... |
parseOptions(const std::vector<std::string> &args, |
98 |
103 |
("dump-stree", "display stree(s)") |
("dump-stree", "display stree(s)") |
99 |
104 |
("dump-tree", "display tree(s)") |
("dump-tree", "display tree(s)") |
100 |
105 |
("time-report", "report time spent on different activities") |
("time-report", "report time spent on different activities") |
|
106 |
|
("no-pager", "never spawn a pager for output") |
101 |
107 |
("fine-only", "use only fine-grained tree") |
("fine-only", "use only fine-grained tree") |
102 |
108 |
("color", "force colorization of output") |
("color", "force colorization of output") |
103 |
109 |
("lang", po::value<std::string>()->default_value({}), |
("lang", po::value<std::string>()->default_value({}), |