diff --git a/CHANGELOG.md b/CHANGELOG.md index cb0fb18..b6bac1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.3.0 (Expected: December 2019) Bumped version to match with clixon 4.3 +* Fixed [Ability to use show attribute to display a multiword string #33](https://github.com/olofhagsand/cligen/issues/33) * Fixed: [Is it possible to hide non-terminal commands? #31](https://github.com/olofhagsand/cligen/issues/31) * Removed "auth" as a local variable in docs, since it is not implemented diff --git a/cligen_gen.h b/cligen_gen.h index 035e0c1..a7a12f9 100644 --- a/cligen_gen.h +++ b/cligen_gen.h @@ -186,10 +186,6 @@ struct cg_obj{ size_t co_userlen; /* Length of the userdata (need copying) */ int co_treeref; /* This node is top of expanded sub-tree */ int co_refdone; /* This reference has already been expanded */ - /* Experiment to make the junos edit style work. When we graft the tree, - these places should insert extra NULL child to be able to edit. - */ - int co_nonterminal; /* Set if we should be able to here */ /* Ugly application code */ struct parse_tree co_pt_push; /* Saved orig of parse-tree (ugly user code) */ diff --git a/cligen_parse.y b/cligen_parse.y index d6ac057..44a0008 100644 --- a/cligen_parse.y +++ b/cligen_parse.y @@ -1213,15 +1213,18 @@ keypairs : keypair | keypairs ' ' keypair ; -numdec : NUMBER { $$ = $1; } - | DECIMAL - ; +numdec : NUMBER { $$ = $1; } + | DECIMAL + ; keypair : NAME '(' ')' { expand_fn(_ya, $1); } | NAME '(' exparglist ')' { expand_fn(_ya, $1); } | V_SHOW ':' NAME { _YA->ya_var->co_show = $3; } + | V_SHOW ':' DQ charseq DQ { + _YA->ya_var->co_show = $4; + } | V_RANGE '[' numdec ':' numdec ']' { if (cg_range(_ya, $3, $5) < 0) YYERROR; free($3); free($5); }