summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-08-04 17:32:19 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-08-04 17:32:19 +0000
commit4fc027edf0bec7890a6171e45b6e28cbffbf6f0a (patch)
tree77944c50d2688783cfb1fb8d4defdefdddc58527
parent6e4adee61573e0d96918ecf1b64d265098dde547 (diff)
downloadzsh-4fc027edf0bec7890a6171e45b6e28cbffbf6f0a.tar.gz
zsh-4fc027edf0bec7890a6171e45b6e28cbffbf6f0a.zip
25384: fix problem with incorrect autoloads of zsh/zle
-rw-r--r--ChangeLog3
-rw-r--r--Src/init.c24
2 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1dc91a655..049c60243 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-08-04 Peter Stephenson <pws@csr.com>
+ * 25384: Src/init.c: fix problem with autoload of zsh/zle
+ for warning message at boot.
+
* users/13093: Src/module.c: HashNode changes didn't
get propagated to AIX-specific code.
diff --git a/Src/init.c b/Src/init.c
index fcbf9236c..a21b39639 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1206,14 +1206,22 @@ VA_DCL
/* autoload */
switch (zle_load_state) {
case 0:
- if (load_module("zsh/zle", NULL, 0) != 1) {
- (void)load_module("zsh/compctl", NULL, 0);
- ret = zle_entry_ptr(cmd, ap);
- /* Don't execute fallback code */
- cmd = -1;
- } else {
- zle_load_state = 2;
- /* Execute fallback code below */
+ /*
+ * Some commands don't require us to load ZLE.
+ * These also have no fallback.
+ */
+ if (cmd != ZLE_CMD_TRASH && cmd != ZLE_CMD_RESET_PROMPT &&
+ cmd != ZLE_CMD_REFRESH)
+ {
+ if (load_module("zsh/zle", NULL, 0) != 1) {
+ (void)load_module("zsh/compctl", NULL, 0);
+ ret = zle_entry_ptr(cmd, ap);
+ /* Don't execute fallback code */
+ cmd = -1;
+ } else {
+ zle_load_state = 2;
+ /* Execute fallback code below */
+ }
}
break;