vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 09c4e2c1cc8d8624e40135cd022c1e97a7a38a53
parent 1638fc249d50ae9e3662379b2a32573a2d35c6ca
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sun, 22 May 2016 00:02:35 +0200

vis: always start vis-menu with -b flag

Diffstat:
Mmain.c | 8++++----
Mvis-open | 2+-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/main.c b/main.c @@ -2147,8 +2147,8 @@ static const char *complete_word(Vis *vis, const char *keys, const Arg *arg) { Buffer cmd; buffer_init(&cmd); char *prefix = get_completion_prefix(vis); - if (prefix && buffer_printf(&cmd, "tr -cs '[:alnum:]_' '\n' | grep '^%s.' | sort -u | " VIS_MENU - " | sed 's/^%s//' | tr -d '\n'", prefix, prefix)) { + if (prefix && buffer_printf(&cmd, "tr -cs '[:alnum:]_' '\n' | grep '^%s.' | sort -u | " + VIS_MENU " -b | 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 }); } @@ -2161,8 +2161,8 @@ static const char *complete_filename(Vis *vis, const char *keys, const Arg *arg) Buffer cmd; buffer_init(&cmd); char *prefix = get_completion_prefix(vis); - if (prefix && buffer_printf(&cmd, "ls -1 | grep '^%s.' | sort | " VIS_MENU - " | sed 's/^%s//' | tr -d '\n'", prefix, prefix)) { + if (prefix && buffer_printf(&cmd, "ls -1 | grep '^%s.' | sort | " + VIS_MENU " -b | 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 }); } diff --git a/vis-open b/vis-open @@ -1,7 +1,7 @@ #!/bin/sh PATTERN="." -VIS_MENU_ARGS="" +VIS_MENU_ARGS="-b" while [ $# -gt 0 ]; do case "$1" in