aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-30 17:30:25 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-30 17:52:17 +0100
commitfc656c3b6248597e71820f3dea1cc98c46f1ca14 (patch)
tree7948825f3c90744d1e1afece37eff59e3e499524
parentc2e8a3dd4ad01a8be61740efb587ca83ceb585ed (diff)
downloadvis-fc656c3b6248597e71820f3dea1cc98c46f1ca14.tar.gz
vis-fc656c3b6248597e71820f3dea1cc98c46f1ca14.tar.xz
sam: execute X and Y commands only once not for every selection
-rw-r--r--sam.c4
1 files 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