On Wed, 25 Feb 2009 23:05:33 +0100, Freddy Vulto wrote:

> Do we have a standardized way in bash-completion for selecting alternative
> completions?

No :/

I believe we could do something a _get_alternative() function: in
Debian/Ubuntu/thelike it would check the symlinks in /etc/alternatives/, in
other distributions we might ask whether they have something similar (also
using external tools is good, just need to be sure they're there) -- and then,
complete "vncviewer" depending on the alternative. something like

case "$alternative" in:
 "tightvnc")
   complete -f _tightvnc vncviewer ;;
 "vncfoobar")
   complete -f _vncfoobar vncviewer ;;
esac

Obviously, $alternative would be handled by some other code there.

Just my two cents,
David

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

Reply via email to