mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-22 03:40:47 +02:00
Change magic-space to respect !".
This commit is contained in:
parent
f11e227cb0
commit
2e4a17b32f
@ -1,5 +1,8 @@
|
||||
2001-06-23 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 15056: Src/Zle/zle_tricky.c: Change magic-space to recognize
|
||||
whether !" (quote against history expansion) has been typed.
|
||||
|
||||
* 15050, 15054: Src/exec.c: Change exit status of external
|
||||
commands that could not be executed, to comply with POSIX.
|
||||
|
||||
|
@ -2241,9 +2241,13 @@ doexpandhist(void)
|
||||
int
|
||||
magicspace(char **args)
|
||||
{
|
||||
char *bangq;
|
||||
int ret;
|
||||
c = ' ';
|
||||
if (!(ret = selfinsert(args)))
|
||||
for (bangq = (char *)line; (bangq = strchr(bangq, bangchar)); bangq += 2)
|
||||
if (bangq[1] == '"' && (bangq == (char *)line || bangq[-1] != '\\'))
|
||||
break;
|
||||
if (!(ret = selfinsert(args)) && (!bangq || bangq + 2 > (char *)line + cs))
|
||||
doexpandhist();
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user