mirror of
https://git.busybox.net/busybox
synced 2026-01-26 16:17:50 +00:00
vi: warn about range in ':!' command
Currently vi in Busybox doesn't support filtering text through an external command with ':1,2!cmd'. Instead it behaves as if no range had been supplied and displays the output of the command. Issue a warning and do nothing in such cases. function old new delta colon 3993 4010 +17 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
f5e1bf966b
commit
9443b0bc5e
1 changed files with 4 additions and 0 deletions
|
|
@ -2951,6 +2951,10 @@ static void colon(char *buf)
|
|||
else if (cmd[0] == '!') { // run a cmd
|
||||
int retcode;
|
||||
// :!ls run the <cmd>
|
||||
if (GOT_ADDRESS) {
|
||||
status_line_bold("Range not allowed");
|
||||
goto ret;
|
||||
}
|
||||
exp = expand_args(buf + 1);
|
||||
if (exp == NULL)
|
||||
goto ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue