vis

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

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

commit d30fd9d47475f09568afd65646e26a8756e59fc0
parent 8404e0c02489a5c2e37651229937a912b1aa9b00
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed,  8 Jul 2015 11:50:00 +0200

vis: only read file content from stdin if - was specified

This allows to feed keyboard input from a file as in:

 cat keyboard-input | vis input-file

which will be used for testing purposes.

Diffstat:
Mvis.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vis.c b/vis.c @@ -2387,7 +2387,7 @@ int main(int argc, char *argv[]) { } if (!vis->windows) { - if (!strcmp(argv[argc-1], "-") || !isatty(STDIN_FILENO)) { + if (!strcmp(argv[argc-1], "-")) { if (!vis_window_new(NULL)) die("Can not create empty buffer\n"); ssize_t len = 0;