1 #include "TermWindow.h"
8 static const char* prog_name
= "spft";
11 fprintf(stderr
, "Usage: %s [-T <title> | title: <title>] [working-directory: <dir>]\n", prog_name
);
12 fprintf(stderr
, " Keyword-style arguments also accept the traditional double-dash syntax\n");
13 fprintf(stderr
, " (eg. \"--title\" instead of \"title:\").\n");
18 int main(int argc
, char* argv
[])
21 settings
.read_settings_files();
23 // Read the arguments.
25 std::list
<std::string
> args(&argv
[1], &argv
[argc
]);
26 while (!args
.empty()) {
27 std::string arg
= args
.front();
29 if (arg
.substr(0, 2) == "--")
30 arg
= arg
.substr(2) + ":";
31 if (arg
== "-T" || arg
== "title:") {
34 settings
.window_title
= args
.front();
37 else if (arg
== "working-directory:") {
40 settings
.working_directory
= args
.front();
43 else if (arg
== "-g" || arg
== "geometry:") {
46 settings
.geometry
= args
.front();
54 TermWindow
* window
= new TermWindow();
55 while (!window
->is_done())