yhun...@gmail.com
unread,May 8, 2012, 12:17:08 AM5/8/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Is argument "-o nospace" of compgen not work?
I write a simple script for auto-completion as following,
-------------
_cooltool()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -o nospace -W "fooOption barOption" -- $cur) )
}
complete -F _cooltool cooltool
-------------
When I type following command in terminal,
$ cooltool ba<tab>
It will become
$ cooltool barOption<space>|
However, I don't hope a space appear at end of line as following
The expected condition should be
$ cooltool barOption|
Is there something wrong for using of "compgen -o nospace" by me?
Do you all have any idea?
Thanks all.