static char* FetchCmd[] = { "fetch", 0, 0 };
/* Default tag region text in editor windows */
-static char* TagString = "Del Put | Font Tabs Eol | x+ w+ !st | Find ";
+static char* TagString = "Del Put Get | Font Tabs Eol | x+ w+ !st | Find ";
/* List of font patterns available to the editor */
static char* Fonts[2] = {
return (field && *field ? field : NULL);
}
+static char* lastfield(char** raw)
+{
+ char* field = *raw;
+ /* skip whitespace */
+ for (; *field && isspace(*field); field++);
+
+ char* eof = field;
+ for (; *eof && *eof != '\n'; eof++);
+ *eof = '\0';
+ *raw = eof + 1;
+
+ return (field && *field ? field : NULL);
+}
+
+
static void parse_args1(int type, Rule* rule, char* args)
{
rule->type = type;
{
rule->type = type;
rule->arg1 = nextfield(&args);
- rule->arg2 = nextfield(&args);
+ rule->arg2 = lastfield(&args);
if (!rule->arg1 || !rule->arg2)
{
printf("action '%s' requires two arguments\n", type2str(type));