Reject options whose required value is missing

This commit is contained in:
Hassan Raza 2026-10-17 13:39:12 +05:00
parent b1df817c44
commit 608e46be33
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View file

@ -231,6 +231,9 @@ Detailed list of changes
0.50.0 [future]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Kittens: Reject command-line options missing their required value instead of
silently ignoring them
- Custom shaders: New :code:`cursor-trail-railgun`, :code:`cursor-trail-torpedo`
and :code:`cursor-trail-pixiedust` shaders that make particles fly off the
cursor as it moves, in the style of neovide (:iss:`10587`)

View file

@ -139,5 +139,8 @@ func (self *Command) parse_args(ctx *Context, args []string) error {
expecting_arg_for = nil
}
}
if expecting_arg_for != nil {
return &ParseError{Option: expecting_arg_for, Message: fmt.Sprintf("The option: :yellow:`%s` requires a value", expecting_arg_for.seen_option)}
}
return nil
}