fix(options): better handling of empty values

Problem:

Whether an option is allowed to be empty isn't well defined and
isn't properly checked.

Solution:

- For non-list string options, explicitly check the option value
  if it is empty.
- Annotate non-list string options that can accept an empty value.
  - Adjust command completion to ignore the empty value.
- Render values in Lua meta files
This commit is contained in:
Lewis Russell
2025-01-10 10:20:43 +00:00
committed by Lewis Russell
parent cb7b4e2962
commit 34e2185022
9 changed files with 72 additions and 42 deletions

View File

@@ -11,8 +11,8 @@ local check_ff_value = function(ff)
end
describe('check_ff_value', function()
itp('views empty string as valid', function()
eq(1, check_ff_value(''))
itp('views empty string as invalid', function()
eq(0, check_ff_value(''))
end)
itp('views "unix", "dos" and "mac" as valid', function()