Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zftp does not work



Peter Stephenson wrote:
> Mads Martin =?iso-8859-1?Q?J=F8rgensen?= wrote:
> > _zftp:31: command not found: zfcd_match
> 
> Have you run zfinit?  It gets autoloaded from there, along with the rest of
> the zftp function suite.

This should make things simpler; the functions are supposed to be installed
with zftp, so should be available for loading.

This makes zfinit load the tcp module as well, the alternative being
the shell crashes until we get the dependencies fixed.

The first part of this (the second hunk below) is a candidate for 4.0.2.

Index: Functions/Zftp/zfinit
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zftp/zfinit,v
retrieving revision 1.1.1.13
diff -u -r1.1.1.13 zfinit
--- Functions/Zftp/zfinit	2000/01/24 09:33:11	1.1.1.13
+++ Functions/Zftp/zfinit	2001/06/14 19:46:43
@@ -1,6 +1,9 @@
 emulate -L zsh
 
-[[ $1 = -n ]] || zmodload -e zsh/zftp || zmodload -ia zsh/zftp zftp || return 1
+if [[ $1 != -n ]]; then
+   zmodload -i zsh/net/tcp || return 1
+   zmodload -ia zsh/zftp zftp || return 1
+fi
 
 if zmodload -i zsh/zutil; then
   local arr
Index: Completion/Zsh/Command/_zftp
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Command/_zftp,v
retrieving revision 1.1
diff -u -r1.1 _zftp
--- Completion/Zsh/Command/_zftp	2001/04/02 11:33:06	1.1
+++ Completion/Zsh/Command/_zftp	2001/06/14 19:46:43
@@ -28,11 +28,13 @@
 case $subcom in
   *(cd|ls|dir))
     # complete remote directories
+    [[ -z ${functions[zfcd_match]} ]] && autoload -U zfcd_match
     _tags directories && zfcd_match $PREFIX $SUFFIX
     ;;
 
   *(get(|at)|gcp|delete|remote))
     # complete remote files
+    [[ -z ${functions[zfget_match]} ]] && autoload -U zfget_match
     _tags files && zfget_match $PREFIX $SUFFIX
     ;;
 
-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author