Arg::last
since 0.1.0
Terminal window
Terminal window
Terminal window
Terminal window
This arg is the last, or final, positional argument (i.e. has the highest index) and is only able to be accessed via the -- syntax (i.e. $ prog args -- last_arg).
Examples
Section titled “Examples”Example 1
Section titled “Example 1”name = "prog"[args]first = {}second = {}third = { action = "set", last = true }name: progargs: first: {} second: {} third: action: set last: true{ "name": "prog", "args": { "first": {}, "second": {}, "third": { "action": "set", "last": true } }}prog one -- threeOutput
Section titled “Output”claptrap_first='one'claptrap_third='three'Example 2
Section titled “Example 2”name = "prog"[args]first = {}second = {}third = { action = "set", last = true }name: progargs: first: {} second: {} third: action: set last: true{ "name": "prog", "args": { "first": {}, "second": {}, "third": { "action": "set", "last": true } }}prog one two threeOutput
Section titled “Output”error: unexpected argument 'three' found
Usage: prog [first] [second] [-- <third>]
For more information, try '--help'.