These options accept an empty value within their choices. If the user didn't add manually input a quote before completing them, add quotes automatically so that the blank value can actually be used.
Unified · Split
| @@ -1220,6 +1220,11 @@ local function handle_choice_completion(option, before_cur, path_pos) · 1219 unmodified lines | ||
| 1220 | 1220 | return handle_file_completion(before_cur, path_pos) |
| 1221 | 1221 | end |
| 1222 | 1222 | |
| 1223 | + -- Fix completing the empty value for --dscale and --cscale. | |
| 1224 | + if info.choices and info.choices[1] == '' and completion_append == '' then | |
| 1225 | + info.choices[1] = '""' | |
| 1226 | + end | |
| 1227 | + | |
| 1223 | 1228 | return info.choices, before_cur |
| 1224 | 1229 | end |
| 1225 | 1230 | |