diff --git a/src/actions.c b/src/actions.c index c41a114..1288fa1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -85,6 +85,36 @@ static int action_node (Node *node) cs++; } } + } else if ((start = + strstr (fixnullstring (node_get (node, TEXT)), "https://"))) { + char url[200]; + char *dest; + + dest = url; + while (*start && !isspace ((unsigned char)*start)) { + *dest = *start; + dest++; + start++; + } + *dest = 0; + { + char *cs = web_command; + char *cd = cmdline; + + while (*cs) { + if (*cs == '*') { + strcat (cd, url); + strcat (cd, cs + 1); + cli_outfunf ("shelling out: %s", cmdline); + /* strcat(cd,"> /dev/null 2>&1 &"); */ + break; + } else { + *cd = *cs; + *(++cd) = '\0'; + } + cs++; + } + } } else if ((start = strchr (fixnullstring (node_get (node, TEXT)), '@'))) { char mail_address[200]; char *dest; diff --git a/src/hnbrc.inc b/src/hnbrc.inc index 6871fb4..3b4217c 100644 --- a/src/hnbrc.inc +++ b/src/hnbrc.inc @@ -694,7 +694,7 @@ menu \"File\" \"save F2\" \"save\"\n\ menu \"File\" \"save as.. \" \"macro saveas\"\n\ macro define saveas\n\ - getquery db_file 'fila to save'\n\ + getquery db_file 'file to save'\n\ save_state\n\ go root\n\ export_$format $db_file\n\