diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2001-06-24 03:42:09 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2001-06-24 03:42:09 +0000 |
commit | 2e4a17b32f0298d899dffa8169d6a7b43d7f547b (patch) | |
tree | 491041f01d930f0a76fe3e4475bb6f314ec08a82 | |
parent | f11e227cb010cab274715e7db816d7406dc62c19 (diff) | |
download | zsh-2e4a17b32f0298d899dffa8169d6a7b43d7f547b.tar.gz zsh-2e4a17b32f0298d899dffa8169d6a7b43d7f547b.tar.xz zsh-2e4a17b32f0298d899dffa8169d6a7b43d7f547b.zip |
Change magic-space to respect !".
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 5a06dbc68..b1121ffe4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 5886b4114..542b50381 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -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; } |