first implementation of “print -c” for columnising, currently hardcoded newlines

This commit is contained in:
tg
2016-11-11 19:59:39 +00:00
parent 6a9dae2144
commit e16b0b9d5b
3 changed files with 44 additions and 8 deletions

4
edit.c
View File

@ -28,7 +28,7 @@
#ifndef MKSH_NO_CMDLINE_EDITING
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.307 2016/09/01 12:59:08 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.308 2016/11/11 19:59:37 tg Exp $");
/*
* in later versions we might use libtermcap for this, but since external
@ -271,7 +271,7 @@ x_print_expansions(int nwords, char * const *words, bool is_command)
*/
x_putc('\r');
x_putc('\n');
pr_list(use_copy ? (char **)XPptrv(l) : words);
pr_list(shl_out, use_copy ? (char **)XPptrv(l) : words);
if (use_copy)
/* not x_free_words() */