ref: 5fde169e1ca610a2cd56e943e9dd669c63c0c07a
parent: 58d42407b1ad3ae4a4a06b097deb01d2cc2a883e
author: phil9 <[email protected]>
date: Tue Jan 24 08:17:56 EST 2023
allow to pass a search term on the command line
--- a/vdict.c
+++ b/vdict.c
@@ -156,7 +156,7 @@
void
usage(void)
{
- fprint(2, "usage: %s [-b] [-h <host>] [-p <port>]\n", argv0);
+ fprint(2, "usage: %s [-b] [-h <host>] [-p <port>] [<search>]\n", argv0);
exits("usage");
}
@@ -217,6 +217,8 @@
a[Elink].c = lchan;
eresize();
entryfocus(entry, 0);
+ if(argc != 0)
+ elink(*argv);
for(;;){
switch(alt(a)){
case Emouse: