Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
api:shell [2016/07/04 17:38]
payonel [Shell API]
api:shell [2019/12/31 01:30] (current)
is2511 [Shell API] Tiny tiny fix `op` -> `ops`
Line 33: Line 33:
   # `args` is `{}`   # `args` is `{}`
  
-  # `opt` is `{}`.+  # `ops` is `{}`.
  
   `program -abC -d arg1 arg2`   `program -abC -d arg1 arg2`
Line 39: Line 39:
   # `args` is `{"​arg1",​ "​arg2"​}`   # `args` is `{"​arg1",​ "​arg2"​}`
  
-  # `opt` is `{a=true,​b=true,​C=true,​d=true}`.+  # `ops` is `{a=true,​b=true,​C=true,​d=true}`.
  
   `program -abC --dog arg1 arg2`   `program -abC --dog arg1 arg2`
Line 45: Line 45:
   # `args` is `{"​arg1",​ "​arg2"​}`   # `args` is `{"​arg1",​ "​arg2"​}`
  
-  # `opt` is `{a=true,​b=true,​C=true,​dog=true}`.+  # `ops` is `{a=true,​b=true,​C=true,​dog=true}`.
  
   `program -abC --dog=foo arg1 arg2`   `program -abC --dog=foo arg1 arg2`
Line 51: Line 51:
   # `args` is `{"​arg1",​ "​arg2"​}`   # `args` is `{"​arg1",​ "​arg2"​}`
  
-  # `opt` is `{a=true,​b=true,​C=true,​dog="​foo"​}`.+  # `ops` is `{a=true,​b=true,​C=true,​dog="​foo"​}`.
  
-  On this next example, notice the single dash before ​d, this causes all of the token to be parsed as single chars+  On this next example, notice the single dash before ​`dog`, this causes all of the token to be parsed as single chars.
  
-  `program -abC -d=foo arg1 arg2`+  `program -abC -dog=foo arg1 arg2`
  
   # `args` is `{"​arg1",​ "​arg2"​}`   # `args` is `{"​arg1",​ "​arg2"​}`
  
-  # `opt` is `{a=true,​b=true,​C=true,​d=true,​g=true,​["​="​]=true,​f=true.o=true}`.+  # `ops` is `{a=true,​b=true,​C=true,​d=true,​g=true,​["​="​]=true,​f=true,o=true}`.