Skip to content

Commit c338db8

Browse files
committed
Example for flag parameters
1 parent 00ddbb1 commit c338db8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/demo/command-interface-demo.dylan

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ end;
4747

4848
define command show interface ($root)
4949
help "Query interfaces";
50+
flag parameter verbose :: <boolean>;
5051
simple parameter name :: <string>,
5152
node-class: <command-oneof>,
5253
alternatives: #("eth0", "eth1", "eth2", "eth3");
@@ -57,7 +58,7 @@ define command show interface ($root)
5758
node-class: <command-oneof>,
5859
alternatives: #("ip","ip4","ip6","lldp");
5960
implementation
60-
format-out("Nothing to show...\n");
61+
format-out("Nothing to show... %= | %=\n", verbose, name);
6162
end;
6263

6364
define command show route ($root)

0 commit comments

Comments
 (0)