Skip to content

spog/u2up-cli-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Compiling "hello-cli":
======================

$ 
$ mkdir demo
$ 

$ 
$ cd demo
demo$ 

demo$ 
demo$ git clone https://github.com/spog/u2up-cli-demo.git
Cloning into 'u2up-cli-demo'...
remote: Enumerating objects: 128, done.
remote: Counting objects: 100% (128/128), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 128 (delta 63), reused 112 (delta 47), pack-reused 0
Receiving objects: 100% (128/128), 46.03 KiB | 628.00 KiB/s, done.
Resolving deltas: 100% (63/63), done.
demo$ 

demo$ 
demo$ cd u2up-cli-demo
demo/u2up-cli-demo$ 

demo/u2up-cli-demo$ 
demo/u2up-cli-demo$ gcc -o hello-cli -I ./include -DU2UP_LOG_MODULE_DEBUG=1 -DU2UP_LOG_MODULE_TRACE=1 -g hello-cli.c
demo/u2up-cli-demo$ 

demo/u2up-cli-demo$ 
demo/u2up-cli-demo$ ls -la
skupno 448
drwxr-xr-x 4 samo samo   4096 maj 22 19:58 .
drwxr-xr-x 3 samo samo   4096 maj 22 19:57 ..
drwxr-xr-x 8 samo samo   4096 maj 22 19:57 .git
-rwxr-xr-x 1 samo samo 403296 maj 22 19:58 hello-cli
-rw-r--r-- 1 samo samo  16455 maj 22 19:57 hello-cli.c
drwxr-xr-x 4 samo samo   4096 maj 22 19:57 include
-rw-r--r-- 1 samo samo  10175 maj 22 19:57 LICENSE
-rw-r--r-- 1 samo samo   3281 maj 22 19:57 README
demo/u2up-cli-demo$ 

Running "hello-cli":
====================

demo/u2up-cli-demo$ 
demo/u2up-cli-demo$ ./hello-cli 
hello-cli>  
hello-cli> help  
help command handle called!'

Press TAB-TAB to display all available commands.
Use TAB for auto-complete.
Use TAB-TAB for auto-suggest.
Use UP and DOWN keys to walk the commands history.

hello-cli> 
help
action1
action2
action3
action4
obj1
obj2
quit
hello-cli> action 
action1
action2
action3
action4
hello-cli> action1  
[str=%s]
hello-cli> action1  
action1: command handle called!'
hello-cli>  
hello-cli> action1 str=hello
action1: command handle called!'
action1 command handle: str=hello
hello-cli>  
hello-cli> action2  
obj1
obj2
hello-cli> action2 obj 
obj1
obj2
hello-cli> action2 obj1  
{aa=%8x | ab=%u}
hello-cli> action2 obj1 aa=f1bedac 
action2 obj1: command handle called!'
action2 obj1: command parameter (aa=0f1bedac)!'
hello-cli>  
hello-cli> quit  
quit command handle called!'
Bye...
demo/u2up-cli-demo$ 

About

U2UP CLI (Command Line Interface) demonstration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published