From fc656c3b6248597e71820f3dea1cc98c46f1ca14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 30 Dec 2016 17:30:25 +0100 Subject: sam: execute X and Y commands only once not for every selection --- sam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sam.c b/sam.c index 6592229..a86cf35 100644 --- 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 -- cgit v1.2.3