From a7c35b8ecce7987f8f7440feca2e93e5f4b767ca Mon Sep 17 00:00:00 2001 From: Michel Martens Date: Thu, 19 May 2016 11:06:47 +0200 Subject: vis: fix behavior of complete-word on BSD --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') 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 }); } -- cgit v1.2.3