From: Daniel Carl Date: Fri, 2 Jan 2015 22:35:06 +0000 (+0100) Subject: Don't end shell cmd at pipe char. X-Git-Url: https://git.owens.tech/assets/lich_lifts_title_slice.png/assets/lich_lifts_title_slice.png/git?a=commitdiff_plain;h=680684ecad219c5e72c7bef12f5c2e60cf6be2cf;p=vimb.git Don't end shell cmd at pipe char. --- diff --git a/doc/vimb.1 b/doc/vimb.1 index 2da764d..778061a 100644 --- a/doc/vimb.1 +++ b/doc/vimb.1 @@ -764,7 +764,10 @@ Example Runs given shell \fIcmd\fP syncron and print the output into inputbox. Following pattern in \fIcmd\fP are expanded, '~username', '~/', '$VAR' and '${VAR}'. A '\\' before these patterns disables the expansion. + .RS +Note: The ":shellcmd" command cannot be followed by another command, since +any '|' is considered part of the command. .PP .PD 0 Following environment variables are set for called shell commands. diff --git a/src/ex.c b/src/ex.c index 6d5f818..e23929b 100644 --- a/src/ex.c +++ b/src/ex.c @@ -195,7 +195,7 @@ static ExInfo commands[] = { {"register", EX_REG, ex_register, EX_FLAG_NONE}, {"save", EX_SAVE, ex_save, EX_FLAG_RHS|EX_FLAG_EXP}, {"set", EX_SET, ex_set, EX_FLAG_RHS}, - {"shellcmd", EX_SHELLCMD, ex_shellcmd, EX_FLAG_RHS|EX_FLAG_EXP|EX_FLAG_BANG}, + {"shellcmd", EX_SHELLCMD, ex_shellcmd, EX_FLAG_CMD|EX_FLAG_EXP|EX_FLAG_BANG}, {"shortcut-add", EX_SCA, ex_shortcut, EX_FLAG_RHS}, {"shortcut-default", EX_SCD, ex_shortcut, EX_FLAG_RHS}, {"shortcut-remove", EX_SCR, ex_shortcut, EX_FLAG_RHS},