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

Re: lftp completion

Sven wrote:

> How about a compromise: check if $HOME/.${words[0]:t}/bookmarks exists 
> and if it doesn't, fall back on $HOME/$service/bookmarks.

We could do that or we could use Bart's function with the style but I
think it would be better not to bother. As it stands,  it works for
lftp and ncftp. If we find other similar commands, then  we can think
about it all then. The most likely other candidates I can think of for
using this function are ncftpget, ncftpput and zftp which will all just
screw up either suggestion anyway.

The ncftp completion as committed by me on Sunday was not something I 
sat down to do a decent job of but was something which had been lying
in my functions directory for months and got committed because I was
doing a clear out and decided that it was more useful than default
completion. In fact, I seem to remember that it is a cut 'n' paste job
from _zftp. I've just looked at _zftp and it seems to be using the
bookmarks themselves so could use _ncftp. I was previously under the
impression that _zftp was taking full hostnames from the ncftp

I think the whole host name completion thing possibly needs a bit of
thought. I've never really looked at all the _my_accounts and other,
similar mechanisms, I've only got a hosts style for _hosts. I'll need
to think about it more and look at some of the existing stuff but it
might be useful to have an _ftphosts which uses lftp, ncftp, zftp
bookmarks etc. What might be better is if _hosts takes various
parameters which specify things like: this is a
telnet/rsh/ftp/ssh/whatever connection or I've specified a user of
'opk' so only list hosts for which these users/connection types are
applicable, and an option to suggest inclusion of ncftp bookmarks.
_hosts could then use the parameters in combination with a few styles.
If anyone has any ideas, (including if you think it is all fine as it
is, let me know).


This message has been checked for all known viruses by the 
MessageLabs Virus Control Centre. For further information visit

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