*/
#ifndef VERSION
-#define VERSION "tig-0.3"
+#define VERSION "tig-0.4.git"
#endif
#ifndef DEBUG
{ "Down", KEY_DOWN },
{ "Insert", KEY_IC },
{ "Delete", KEY_DC },
+ { "Hash", '#' },
{ "Home", KEY_HOME },
{ "End", KEY_END },
{ "PageUp", KEY_PPAGE },
}
if (!strcmp(argv[0], "commit-encoding")) {
- string_copy(opt_encoding, argv[2]);
- return OK;
+ char *arg = argv[2];
+ int delimiter = *arg;
+ int i;
+
+ switch (delimiter) {
+ case '"':
+ case '\'':
+ for (arg++, i = 0; arg[i]; i++)
+ if (arg[i] == delimiter) {
+ arg[i] = 0;
+ break;
+ }
+ default:
+ string_copy(opt_encoding, arg);
+ return OK;
+ }
}
config_msg = "Unknown variable name";
/* Check for comment markers, since read_properties() will
* only ensure opt and value are split at first " \t". */
- optlen = strcspn(opt, "#;");
+ optlen = strcspn(opt, "#");
if (optlen == 0)
return OK;
} else {
/* Look for comment endings in the value. */
- int len = strcspn(value, "#;");
+ int len = strcspn(value, "#");
if (len < valuelen) {
valuelen = len;