vis

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

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

commit 32e66fde1ceb1732e8c50e7d83572b9b0d21eced
parent 157193a0439d625f28bc2cdbf4e707874e9030dc
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Fri, 30 Dec 2016 17:30:25 +0100

sam: execute X and Y commands only once not for every selection

Diffstat:
Msam.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sam.c b/sam.c @@ -160,10 +160,10 @@ static const CommandDef cmds[] = { CMD_CMD|CMD_REGEX|CMD_ADDRESS_ALL_1CURSOR, "p", cmd_extract }, { "X", "Run command on files whose name matches", - CMD_CMD|CMD_REGEX|CMD_REGEX_DEFAULT|CMD_ADDRESS_NONE, NULL, cmd_files + CMD_CMD|CMD_REGEX|CMD_REGEX_DEFAULT|CMD_ADDRESS_NONE|CMD_ONCE, NULL, cmd_files }, { "Y", "As `X` but select unmatched files", - CMD_CMD|CMD_REGEX|CMD_ADDRESS_NONE, NULL, cmd_files + CMD_CMD|CMD_REGEX|CMD_ADDRESS_NONE|CMD_ONCE, NULL, cmd_files }, { ">", "Send range to stdin of command", CMD_SHELL|CMD_ADDRESS_LINE, NULL, cmd_pipeout