From 25c3a96bd0753518ae6218fc9d10502032cbe572 Mon Sep 17 00:00:00 2001 From: phessler Date: Sun, 11 Oct 2015 19:21:44 +0000 Subject: [PATCH] add "best" as an alias for "selected" Helps finger memory for people used to Junipers OK benno@, claudio@ --- usr.sbin/bgpctl/bgpctl.8 | 7 +++++-- usr.sbin/bgpctl/parser.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bgpctl/bgpctl.8 b/usr.sbin/bgpctl/bgpctl.8 index 27b5697be29..49750443abe 100644 --- a/usr.sbin/bgpctl/bgpctl.8 +++ b/usr.sbin/bgpctl/bgpctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgpctl.8,v 1.64 2014/08/14 19:08:21 schwarze Exp $ +.\" $OpenBSD: bgpctl.8,v 1.65 2015/10/11 19:21:44 phessler Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 14 2014 $ +.Dd $Mdocdate: October 11 2015 $ .Dt BGPCTL 8 .Os .Sh NAME @@ -331,6 +331,9 @@ Additionally, the following are defined: .Pp .Bl -tag -width "detail" -compact +.It Cm best +Alias for +.Ic selected . .It Cm selected Show only selected routes. .It Cm detail diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index 71a066fd67f..7c51df92f32 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.71 2015/10/05 14:18:33 deraadt Exp $ */ +/* $OpenBSD: parser.c,v 1.72 2015/10/11 19:21:44 phessler Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -160,6 +160,7 @@ static const struct token t_show_rib[] = { { ASTYPE, "peer-as", AS_PEER, t_show_rib_as}, { ASTYPE, "empty-as", AS_EMPTY, t_show_rib}, { KEYWORD, "community", NONE, t_show_community}, + { FLAG, "best", F_CTL_ACTIVE, t_show_rib}, { FLAG, "selected", F_CTL_ACTIVE, t_show_rib}, { FLAG, "detail", F_CTL_DETAIL, t_show_rib}, { FLAG, "in", F_CTL_ADJ_IN, t_show_rib}, -- 2.20.1