From 608e46be330ecca8623901608b5cfe3f740a91bb Mon Sep 17 00:00:00 2001 From: Hassan Raza Date: Sat, 17 Oct 2026 13:39:12 +0500 Subject: [PATCH] Reject options whose required value is missing --- docs/changelog.rst | 3 +++ tools/cli/parse-args.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 26fde909e..ea90f2e84 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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`) diff --git a/tools/cli/parse-args.go b/tools/cli/parse-args.go index dde4eb3c0..8aa4b1de2 100644 --- a/tools/cli/parse-args.go +++ b/tools/cli/parse-args.go @@ -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 }