> > +1 for a specific alias for "del" though. > > I also worry about this. However the addition of a few well-selected > shortenings is OK. >
Here is a patch that adds the "del" shortcut. I am not sure the usage() et man are changed the "right way" though. Index: keywords.h =================================================================== RCS file: /cvs/src/sbin/route/keywords.h,v retrieving revision 1.33 diff -u -p -r1.33 keywords.h --- keywords.h 4 Sep 2016 09:41:03 -0000 1.33 +++ keywords.h 27 Jul 2017 19:50:38 -0000 @@ -1,4 +1,4 @@ -/* $OpenBSD: keywords.h,v 1.33 2016/09/04 09:41:03 claudio Exp $ */ +/* $OpenBSD$ */ /* WARNING! This file was generated by keywords.sh */ @@ -16,6 +16,7 @@ enum { K_CHANGE, K_CLONING, K_CONNECTED, + K_DEL, K_DELETE, K_DST, K_EXEC, @@ -78,6 +79,7 @@ struct keytab keywords[] = { { "change", K_CHANGE }, { "cloning", K_CLONING }, { "connected", K_CONNECTED }, + { "del", K_DEL }, { "delete", K_DELETE }, { "dst", K_DST }, { "exec", K_EXEC }, Index: keywords.sh =================================================================== RCS file: /cvs/src/sbin/route/keywords.sh,v retrieving revision 1.31 diff -u -p -r1.31 keywords.sh --- keywords.sh 4 Sep 2016 09:41:03 -0000 1.31 +++ keywords.sh 27 Jul 2017 19:50:38 -0000 @@ -17,6 +17,7 @@ bgp change cloning connected +del delete dst exec Index: route.8 =================================================================== RCS file: /cvs/src/sbin/route/route.8,v retrieving revision 1.79 diff -u -p -r1.79 route.8 --- route.8 1 Jan 2017 01:08:11 -0000 1.79 +++ route.8 27 Jul 2017 19:50:38 -0000 @@ -211,6 +211,14 @@ have the syntax: .Nm route .Op Fl dnqtv .Op Fl T Ar tableid +.Cm del +.Op Ar modifiers +.Ar destination gateway +.Xc +.It Xo +.Nm route +.Op Fl dnqtv +.Op Fl T Ar tableid .Cm delete .Op Ar modifiers .Ar destination gateway Index: route.c =================================================================== RCS file: /cvs/src/sbin/route/route.c,v retrieving revision 1.200 diff -u -p -r1.200 route.c --- route.c 23 Mar 2017 13:28:25 -0000 1.200 +++ route.c 27 Jul 2017 19:50:38 -0000 @@ -134,7 +134,7 @@ usage(char *cp) "usage: %s [-dnqtv] [-T tableid] command [[modifiers] args]\n", __progname); fprintf(stderr, - "commands: add, change, delete, exec, flush, get, monitor, show\n"); + "commands: add, change, del, delete, exec, flush, get, monitor, show\n"); exit(1); } @@ -252,6 +252,7 @@ main(int argc, char **argv) /* FALLTHROUGH */ case K_CHANGE: case K_ADD: + case K_DEL: case K_DELETE: rval = newroute(argc, argv); break;