2006/2/9, Egon Kocjan <[EMAIL PROTECTED]>: > Hi, > > I've been thinking about completion of network servers/services for some time, > so we could complete links for wget, curl and others. I've noticed that there > is one really low hanging fruit out there - we can use kio slaves (and > gnome-vfs and possibly others)! I wrote a really simple completion script for > kio, since you can use KDE's kioclient like this: > > kioclient ls ftp://someserver/path/abc/ > > This command simply lists contents of the remote directory. There is another > really cool feature, that we get for free:
Cool. I'll install kio and give this a try. I though that I had kde installed on my system, but those commands just aren't there. > > > konqueror ftp://someserver/[tab] > Kio now presents a password dialog if needed. After you are successfully > logged in, you can proceed normally. Nice. How long does this password caching work for? Does gnome-vfs also have this? Wget doesn't as far as I know... > > The question is, how could the external VFS methods be integrated into fish? > > 1. we can use VFS from currently running desktop environment for all commands > > 2. we can use "native" VFS for each class of command (kio for kde apps, > gnome-vfs for gnome apps, fuse for wget/curl/...), so VFS implementation > differences won't cause problems > > 3. we can provide all VFS methods at the same time, just assign them different > key bindigs (like C-k for kio, C-g for gnome-vfs, ...) > > > 3. is the easiest to implement, but it probably isn't very nice to use. 1. is > just a bit harder, but it is much nicer to use. 2. is the most proper > implementation, but it requires a lot of manual work I guess... Good question. We should minimize the user-visible differences stemming from using different underlying libraries. That would be pretty easy if it wasn't for that password caching feature described above. But given that we don't want to get in the way of the password caching stuff, we might have to implement the kio completions using kio, and the gnome-vfs completions using gnome-vfs. This has the advantage that we won't truly depend on any library, the kio completions will work if you have kio installed, and otherwise you wouldn't want to use them anyway. It would be bad form to require Gnome users to install KDE or vice versa to get the 'full fish experience'. (The rpm completions work much better in fish if you have apt-get installed, since apt-get is simply much faster at querying the rpm database for a list of all installed packages, but there is a fallback method using the rpm command. ) As to commands that don't use any password caching scheme, I guess simply using the completions that are the most functional would be good. So in the end, we could have something like: function __fish_complete_kio ... end function __fish_complete_gvfs ... end if blah blah blah function __fish_complete_netpath __fish_complete_kio end else function __fish_complete_netpath __fish_complete_gvfs end end -- Axel ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
