summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-07-28 15:53:32 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-07-28 15:53:32 +0000
commit93e0bc094fe10cb5b20a53818247d10a2ecdec14 (patch)
treeed5cd44e63b50f74de0e63f85cf11033f9eddef4
parent4de3dbac168aa5e89d4f7c278917c8af4b226542 (diff)
downloadzsh-93e0bc094fe10cb5b20a53818247d10a2ecdec14.tar.gz
zsh-93e0bc094fe10cb5b20a53818247d10a2ecdec14.tar.xz
zsh-93e0bc094fe10cb5b20a53818247d10a2ecdec14.zip
users/15204: in zfinit check for compctl before using
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Zftp/zfinit3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b5c127448..36f247e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-07-28  Peter Stephenson  <pws@csr.com>
 
+	* users/15204: Functions/Zftp/zfinit: check compctl is loaded
+	before trying to use it (for ksh emulation).
+
 	* as described in users/15202: Functions/Misc/run-help,
 	Functions/Newuser/zsh-newuser-install,
 	Functions/Prompts/promptinit, Functions/TCP/tcp_open,
@@ -13438,5 +13441,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5037 $
+* $Revision: 1.5038 $
 *****************************************************
diff --git a/Functions/Zftp/zfinit b/Functions/Zftp/zfinit
index 68e6a9691..5587a824c 100644
--- a/Functions/Zftp/zfinit
+++ b/Functions/Zftp/zfinit
@@ -34,7 +34,8 @@ autoload -Uz zfstat zftp_chpwd zftp_progress zftransfer zftype zfuget zfuput
 # zftp completions: only use these if new-style completion is not
 # active.
 #
-if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)_zf*]} ]]; then
+if [[ ${#_patcomps} -eq 0 || -z ${_patcomps[(r)_zf*]} ]] &&
+  (compctl >/dev/null 2>&1); then
   # only way of getting that noglob out of the way: this is unnecessary with
   # widget-based completion
   setopt completealiases