This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prom@horsey:/extra/Projects/opendylan/libraries/command-interface$ _build/bin/command-interface-demo | |
> | |
Commands: | |
configure - Modify configuration | |
show - Show information | |
echo - Command | |
directory - Show information about directory | |
examine - Command | |
error - Fail miserably | |
quit - Quit the shell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define cli-command $root (fnord) | |
help "Fnord, whatever that means..."; | |
named parameter file :: <cli-file>, | |
must-exist?: #t; | |
named parameter oneof :: <cli-oneof>, | |
alternatives: #("bla", "blubb", "boo"); | |
end; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(char in string, offset from 0) | |
select(state) | |
#"initial" => | |
case | |
char.whitespace? => | |
maybe-push-collected(); | |
char = '"' => | |
state := #"dquote"; | |
char = '?' => | |
if(collected-start) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prom@kitten:~$ cli help sho | |
configuration interface log route | |
prom@kitten:~$ cli help sho interface | |
SHOW INTERFACE | |
Query the interface database | |
prom@kitten:~$ cli shell | |
> sh |
NewerOlder