On 1/30/07, Axel Liljencrantz <[EMAIL PROTECTED]> wrote: [...] > Fish actually has this as well. Try using file completion in e.g. > bunzip2, and fish will complete bz2 archives rather than other files > if possible. To use this, use the __fish_complete_suffix function like > this: > > complete -c evince -x -a "( __fish_complete_suffix (commandline -ct) > .pdf 'PDF document')"
I spent a bit of time thinking about __fish_complete_suffix. It's silly to provide a description when one can be looked up in the mimetype database. The third argument is now optional, and when missing, will be looked up automatically. Also, providing the string to complete is nice for debugging purposes, but it's pretty silly to always do it, so that is also optional. The new version means you can use complete -c evince -x -a "( __fish_complete_suffix .pdf)" which is easer to understand and should actually produce better results as well. -- Axel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
