On 8/27/06, Martin Bähr <[EMAIL PROTECTED]> wrote: [...] > > >one way to make this easy could be that if a string starts with ./ or / > > >it is always a directory, and hence would always do path completion. > > >alternatively: if no other completions work on the given token, but path > > >completion does, then do path completion. it should be like the default > > >that always works. > > The second alternative makes sense. Added. Good idea. Thanks. > > unfortunately (as i just realized) the second alternative does not help > on an empty token (and also not in cases where the token matches on both > filenames and options), because in that case fish will find working > completions, only they are the wrong ones because file completions are > wanted.
It does help on an empty token, so long as there are no other completions. And since switches won't be displayes as possible completions unless at least the initial hyphen has been given, there will rarely be a conflict between the two. There may still be situations where you'd want file completions but don't get them, those situations should be _very_ rare, I think that is a fair tradeoff. If it was impossible to ever turn off file completion, it would limit the usefulness of command specific completions in some situations, like when completing the make command, wanting to specify an object file that doesn't exist but having a source file for the object. If you have a different command with the same name as one with comeletions in fish, all you have to do to disable the compeltions is 'touch ~/.fish.d/comlpetions/COMMAND.fish'. > > greetings, martin. > -- > cooperative communication with sTeam - caudium, pike, roxen and unix > offering: programming, training and administration - anywhere in the world > -- > pike programmer travelling and working in europe open-steam.org > unix system- bahai.or.at iaeste.(tuwien.ac|or).at > administrator (caudium|gotpike).org is.schon.org > Martin Bähr http://www.iaeste.or.at/~mbaehr/ > -- Axel ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
