aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-16 22:39:28 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-16 22:39:28 +0100
commit4707fed2a21f4836b0eba28135040c3a456c9da9 (patch)
tree7edbe2574c64edc690eeb917609e3d1a493e6158 /main.c
parent4a6df4bceaf76d4ed727ddf3510d69f65484324c (diff)
downloadvis-4707fed2a21f4836b0eba28135040c3a456c9da9.tar.gz
vis-4707fed2a21f4836b0eba28135040c3a456c9da9.tar.xz
sam: use default shell command for <, >, | and ! when applicaple
If the shell command is omitted, the last shell command (of any type) is substituted. The most recently used shell command is stored in a new register currently named `!`.
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index d1c346e..5b61022 100644
--- a/main.c
+++ b/main.c
@@ -1265,6 +1265,8 @@ static const char *key2register(Vis *vis, const char *keys, enum VisRegister *re
*reg = VIS_REG_SEARCH;
else if (keys[0] == ':')
*reg = VIS_REG_COMMAND;
+ else if (keys[0] == '!')
+ *reg = VIS_REG_SHELL;
return keys+1;
}