[Bash-completion-devel] vncviewer
David Paleino
d.paleino at gmail.com
Wed Feb 25 22:19:30 UTC 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20090225/30597f35/attachment.pgp
More information about the Bash-completion-devel
mailing list