aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 6baff3b..4b5d2ea 100644
--- a/main.c
+++ b/main.c
@@ -2148,7 +2148,7 @@ static const char *complete_word(Vis *vis, const char *keys, const Arg *arg) {
buffer_init(&cmd);
char *prefix = get_completion_prefix(vis);
if (prefix && buffer_printf(&cmd, "tr \" ;:$<>#?{}()[],.'\" '\n' | "
- " grep '^%s' | sort | uniq | " VIS_MENU " | tr -d '\n' | sed 's/%s//'", prefix, prefix)) {
+ " grep '^%s.' | sort | uniq | " VIS_MENU " | sed 's/%s//' | tr -d '\n'", prefix, prefix)) {
Filerange all = text_range_new(0, text_size(txt));
insert_dialog_selection(vis, &all, (const char*[]){ buffer_content0(&cmd), NULL });
}
@@ -2162,7 +2162,7 @@ static const char *complete_filename(Vis *vis, const char *keys, const Arg *arg)
buffer_init(&cmd);
char *prefix = get_completion_prefix(vis);
if (prefix && buffer_printf(&cmd, "ls | grep '^%s' | sort | " VIS_MENU
- " | tr -d '\n' | sed 's/%s//'", prefix, prefix)) {
+ " | sed 's/%s//' | tr -d '\n'", prefix, prefix)) {
Filerange empty = text_range_new(0, 0);
insert_dialog_selection(vis, &empty, (const char*[]){ buffer_content0(&cmd), NULL });
}