>> Problems with this approach: >> Get this accepted in all getopt implementations. > > seems a lot easier than getting all apps patched.
An alternative approach that actually almost always works is to parse the manpage, at least as a fallback. I was looking at command completion a while back and this approach worked with nearly every manpage I threw at it. The major blocking issue was that many manpages have very long descriptions of first switches, and the first sentence of the description (which I was clipping to) often doesn’t properly describe the option’s effect. The completion was inside a GUI, so it wasn’t too terrible for us to show the whole description, but inside of a shell this obviously wouldn’t be ideal. -Ben ------------------------------------------------------------------------- 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
