diff options
author | Daniel Carl <danielcarl@gmx.de> | 2017-07-24 23:23:02 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2017-07-24 23:23:02 +0200 |
commit | 8efc92afaf9ac3f516ba2b4dc70ce60280a8c908 (patch) | |
tree | b03f81a3b37e672a792cbe27d34c444ab68d660e | |
parent | a410f31c254eb61cced390051a1703900dade4be (diff) |
Show --bug-info separate from version.
Do not print to much in case the user is only interested in the current
used version. So show vimb version only on options -v, --version and
added the new option --bug-version which shows the currently used libs
and the library versions vimb was compiled against.
-rw-r--r-- | .github/ISSUE_TEMPLATE.md | 2 | ||||
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | doc/vimb.1 | 5 | ||||
-rw-r--r-- | src/main.c | 7 |
4 files changed, 13 insertions, 5 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 433da4c..91bdb03 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,5 @@ <!-- If this is a bug report, please provide your version information -$ vimb --version --> +$ vimb --bug-info --> ### Steps to reproduce ### Expected behaviour diff --git a/CHANGELOG.md b/CHANGELOG.md index 624501f..7ccdceb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. the first char. * `hint-keys=0123` -> `1 2 3 10 11 12 13` * `hint-keys=asdf` -> `a s d f aa as ad af` -* Show versions of used libs on `vimb -v` and the extension directory for - easier issue investigation. +* Show versions of used libs on `vimb --bug-info` and the extension directory + for easier issue investigation. * During hinting JavaScript is enabled and reset to it's previous setting after hinting is done might be security relevant. * Allow extended hints mode also for open `g;o` to allow the user to toggle @@ -46,7 +46,10 @@ Configuration data for the profile is stored in a directory named \fIPROFILE-NAME\fP under default directory for configuration data. .TP .B "\-v, \-\-version" -Print build and version information. +Print build and version information and then quit. +.TP +.B "\-\-bug-info" +Prints information about used libraries for bug reports and then quit. .SH MODES Vimb is modal and has the following main modes: .TP @@ -1764,13 +1764,14 @@ int main(int argc, char* argv[]) Client *c; GError *err = NULL; char *pidstr, *winid = NULL; - gboolean ver = FALSE; + gboolean ver = FALSE, buginfo = FALSE; GOptionEntry opts[] = { {"embed", 'e', 0, G_OPTION_ARG_STRING, &winid, "Reparents to window specified by xid", NULL}, {"config", 'c', 0, G_OPTION_ARG_FILENAME, &vb.configfile, "Custom configuration file", NULL}, {"profile", 'p', 0, G_OPTION_ARG_CALLBACK, (GOptionArgFunc*)profileOptionArgFunc, "Profile name", NULL}, {"version", 'v', 0, G_OPTION_ARG_NONE, &ver, "Print version", NULL}, + {"bug-info", 0, 0, G_OPTION_ARG_NONE, &buginfo, "Print used library versions", NULL}, {NULL} }; @@ -1784,6 +1785,10 @@ int main(int argc, char* argv[]) if (ver) { printf("%s, version %s\n\n", PROJECT, VERSION); + return EXIT_SUCCESS; + } + + if (buginfo) { printf("Commit: %s\n", COMMIT); printf("WebKit compile: %d.%d.%d\n", WEBKIT_MAJOR_VERSION, |