diff options
| author | Michel Martens <michel@soveran.com> | 2016-05-19 11:06:47 +0200 |
|---|---|---|
| committer | Michel Martens <michel@soveran.com> | 2016-05-19 11:06:47 +0200 |
| commit | a7c35b8ecce7987f8f7440feca2e93e5f4b767ca (patch) | |
| tree | 7a3a43ac25e5c4a5b46f566a51e6dc1488f43904 | |
| parent | 352155889aad57f8cb6d20317ffef81073fb6533 (diff) | |
| download | vis-a7c35b8ecce7987f8f7440feca2e93e5f4b767ca.tar.gz vis-a7c35b8ecce7987f8f7440feca2e93e5f4b767ca.tar.xz | |
vis: fix behavior of complete-word on BSD
| -rw-r--r-- | main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 }); } |
