Skip to content

Arg::last

since 0.1.0

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).

name = "prog"
[args]
first = {}
second = {}
third = { action = "set", last = true }
Terminal window
prog one -- three
Terminal window
claptrap_first='one'
claptrap_third='three'
name = "prog"
[args]
first = {}
second = {}
third = { action = "set", last = true }
Terminal window
prog one two three
Terminal window
error: unexpected argument 'three' found
Usage: prog [first] [second] [-- <third>]
For more information, try '--help'.