File ChangeLog changed (mode: 100644) (index 534e36fb0..900a6e562) |
232 |
232 |
Fixed running external commands which start with a dash. Patch by Ivan |
Fixed running external commands which start with a dash. Patch by Ivan |
233 |
233 |
Shapovalov. |
Shapovalov. |
234 |
234 |
|
|
|
235 |
|
Fixed absolute paths not being completed when 'autocd' option is enabled. |
|
236 |
|
Thanks to Taras Halturin (a.k.a. halturin). |
|
237 |
|
|
235 |
238 |
0.13-beta to 0.13 (2023-04-04) |
0.13-beta to 0.13 (2023-04-04) |
236 |
239 |
|
|
237 |
240 |
Made "withicase" and "withrcase" affect how files are sorted before |
Made "withicase" and "withrcase" affect how files are sorted before |
File src/engine/cmds.c changed (mode: 100644) (index 3df71f5c2..27697b45c) |
... |
... |
vle_cmds_complete(const char cmd[], void *arg) |
542 |
542 |
prefix_len += complete_cmd_args(cur, args, &cmd_info, arg); |
prefix_len += complete_cmd_args(cur, args, &cmd_info, arg); |
543 |
543 |
} |
} |
544 |
544 |
} |
} |
|
545 |
|
else |
|
546 |
|
{ |
|
547 |
|
prefix_len += cmds_conf->complete_line(cmd, arg); |
|
548 |
|
} |
545 |
549 |
|
|
546 |
550 |
return prefix_len; |
return prefix_len; |
547 |
551 |
} |
} |
File tests/cmds/completion.c changed (mode: 100644) (index 8563cdb5c..19be14303) |
... |
... |
TEST(line_completion_args) |
369 |
369 |
free(buf); |
free(buf); |
370 |
370 |
} |
} |
371 |
371 |
|
|
|
372 |
|
TEST(line_completion_bad_range) |
|
373 |
|
{ |
|
374 |
|
char *buf; |
|
375 |
|
|
|
376 |
|
line_completion_enabled = 1; |
|
377 |
|
|
|
378 |
|
vle_compl_reset(); |
|
379 |
|
assert_int_equal(0, vle_cmds_complete("/bad-range", NULL)); |
|
380 |
|
|
|
381 |
|
buf = vle_compl_next(); |
|
382 |
|
assert_string_equal("whole-line1", buf); |
|
383 |
|
free(buf); |
|
384 |
|
|
|
385 |
|
buf = vle_compl_next(); |
|
386 |
|
assert_string_equal("whole-line2", buf); |
|
387 |
|
free(buf); |
|
388 |
|
|
|
389 |
|
buf = vle_compl_next(); |
|
390 |
|
assert_string_equal("/bad-range", buf); |
|
391 |
|
free(buf); |
|
392 |
|
} |
|
393 |
|
|
372 |
394 |
static int |
static int |
373 |
395 |
foreign_cmd(const cmd_info_t *cmd_info) |
foreign_cmd(const cmd_info_t *cmd_info) |
374 |
396 |
{ |
{ |
File tests/misc/cmdline_completion.c changed (mode: 100644) (index 6f67c3855..789b9315f) |
... |
... |
TEST(autocd_completion) |
335 |
335 |
make_abs_path(curr_view->curr_dir, sizeof(curr_view->curr_dir), SANDBOX_PATH, |
make_abs_path(curr_view->curr_dir, sizeof(curr_view->curr_dir), SANDBOX_PATH, |
336 |
336 |
"", saved_cwd); |
"", saved_cwd); |
337 |
337 |
|
|
|
338 |
|
/* Absolute path completion. */ |
|
339 |
|
char abs_path[PATH_MAX + 1], expected[PATH_MAX + 1]; |
|
340 |
|
make_abs_path(abs_path, sizeof(abs_path), SANDBOX_PATH, "mydir", saved_cwd); |
|
341 |
|
make_abs_path(expected, sizeof(expected), SANDBOX_PATH, "mydir1/", saved_cwd); |
|
342 |
|
wchar_t *wide_abs_path = to_wide_force(abs_path); |
|
343 |
|
wchar_t *wide_expected = to_wide_force(expected); |
|
344 |
|
ASSERT_COMPLETION(wide_abs_path, wide_expected); |
|
345 |
|
free(wide_expected); |
|
346 |
|
free(wide_abs_path); |
|
347 |
|
|
338 |
348 |
cfg.auto_cd = 0; |
cfg.auto_cd = 0; |
339 |
349 |
|
|
340 |
350 |
ASSERT_NO_COMPLETION(L"myd"); |
ASSERT_NO_COMPLETION(L"myd"); |