File docs/pipedial.1 changed (mode: 100644) (index 115f2f6..6f1e733) |
1 |
1 |
.\" Automatically generated by Pandoc 1.17.0.3 |
.\" Automatically generated by Pandoc 1.17.0.3 |
2 |
2 |
.\" |
.\" |
3 |
|
.TH "pipedial" "1" "July 29, 2020" "" "" |
|
|
3 |
|
.TH "pipedial" "1" "September 20, 2020" "" "" |
4 |
4 |
.hy |
.hy |
5 |
5 |
.SH NAME |
.SH NAME |
6 |
6 |
.PP |
.PP |
|
... |
... |
Display short usage help. |
23 |
23 |
.SS \f[B]\-\-version\f[] |
.SS \f[B]\-\-version\f[] |
24 |
24 |
.PP |
.PP |
25 |
25 |
Display version information. |
Display version information. |
|
26 |
|
.SS \f[B]\-\-filter, \-f\f[] |
|
27 |
|
.PP |
|
28 |
|
Start in filtering mode. |
26 |
29 |
.SH SHORTCUTS |
.SH SHORTCUTS |
27 |
30 |
.PP |
.PP |
28 |
31 |
\f[B]{Escape}\f[] \-\- abort partially typed shortcut. |
\f[B]{Escape}\f[] \-\- abort partially typed shortcut. |
File src/Args.cpp changed (mode: 100644) (index 92ac31c..994f5ad) |
... |
... |
Args::Args(int argc, const char *argv[]) |
26 |
26 |
TCLAP::CmdLine cmd("Terminal element picker.", ' ', "0.2"); |
TCLAP::CmdLine cmd("Terminal element picker.", ' ', "0.2"); |
27 |
27 |
TCLAP::ValueArg<std::string> titleArg("t", "title", "Title message", false, |
TCLAP::ValueArg<std::string> titleArg("t", "title", "Title message", false, |
28 |
28 |
"", "string", cmd); |
"", "string", cmd); |
|
29 |
|
TCLAP::SwitchArg filterArg("f", "filter", "Start in filtering mode", cmd); |
29 |
30 |
|
|
30 |
31 |
cmd.parse(argc, argv); |
cmd.parse(argc, argv); |
31 |
32 |
|
|
32 |
33 |
title = (titleArg.isSet() ? titleArg.getValue() : "Pick an item:"); |
title = (titleArg.isSet() ? titleArg.getValue() : "Pick an item:"); |
|
34 |
|
filterOnStart = filterArg.isSet(); |
33 |
35 |
} |
} |
File src/Args.hpp changed (mode: 100644) (index 80410d4..67bb1a0) |
... |
... |
public: |
32 |
32 |
std::string getTitle() const |
std::string getTitle() const |
33 |
33 |
{ return title; } |
{ return title; } |
34 |
34 |
|
|
|
35 |
|
// Retrieves filter-on-start flag. |
|
36 |
|
bool getFilterOnStart() const |
|
37 |
|
{ return filterOnStart; } |
|
38 |
|
|
35 |
39 |
public: |
public: |
36 |
|
std::string title; // Title of the list. |
|
|
40 |
|
std::string title; // Title of the list. |
|
41 |
|
bool filterOnStart; // Start in filtering mode. |
37 |
42 |
}; |
}; |
38 |
43 |
|
|
39 |
44 |
#endif // PIPEDIAL__ARGS_HPP__ |
#endif // PIPEDIAL__ARGS_HPP__ |
File src/PipeDial.cpp changed (mode: 100644) (index 1f679a4..6ea47bb) |
... |
... |
PipeDial::buildHelpMode() |
341 |
341 |
} |
} |
342 |
342 |
|
|
343 |
343 |
std::wstring |
std::wstring |
344 |
|
PipeDial::run() |
|
|
344 |
|
PipeDial::run(bool filterOnStart) |
345 |
345 |
{ |
{ |
346 |
346 |
// Make sure curses lets go of the screen when this method ends. |
// Make sure curses lets go of the screen when this method ends. |
347 |
347 |
struct S { |
struct S { |
|
... |
... |
PipeDial::run() |
350 |
350 |
} s { screen }; |
} s { screen }; |
351 |
351 |
|
|
352 |
352 |
screen.replaceTopWidget(&track); |
screen.replaceTopWidget(&track); |
|
353 |
|
|
|
354 |
|
if (filterOnStart) { |
|
355 |
|
filter(); |
|
356 |
|
} |
353 |
357 |
screen.draw(); |
screen.draw(); |
354 |
358 |
|
|
355 |
359 |
vle::KeyDispatcher dispatcher; |
vle::KeyDispatcher dispatcher; |