[rfc][icedtea-web] add files bash completion to our script
Jiri Vanek
jvanek at redhat.com
Thu Jan 5 09:39:11 UTC 2017
On 01/05/2017 10:27 AM, Jiri Vanek wrote:
> On 01/04/2017 05:03 PM, Jiri Vanek wrote:
>>
>> I realized that if our bash compeltion is isntalled, it is sucesfully blocking nay file compeltion,
>> which is quite bad. As some compromise, there is my solution on this
>> As I'm completly new to it, Ihope somebody will ave better ideas....
>>
>>
>> As reminder, also fully generated completion file is attached
>> Tahnx!
>> J.
> Maybe a bit better one?
>
> diff -r f5dedb2c83b6 icedteaweb-completion.in
> --- a/icedteaweb-completion.in Wed Jan 04 16:23:45 2017 +0100
> +++ b/icedteaweb-completion.in Thu Jan 05 10:26:14 2017 +0100
> @@ -36,8 +36,13 @@
> prev="${COMP_WORDS[COMP_CWORD-1]}"
>
> # JavaWs Options
> - opts="@JAVAWS@"
> - COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
> - return 0
> + if [[ $prev == *"-jnlp" || $prev == *"-html" ]] ; then
> + COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
> + return 0
> + else
> + opts="@JAVAWS@"
> + COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
> + return 0
> + fi
> }
> complete -F _javaws javaws
>
>
>
> Still do not comply directories with single subdir correctly...
>
> J.
probbaly best comrimise attached
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filesForJavaws2.patch
Type: text/x-patch
Size: 686 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20170105/3f66104f/filesForJavaws2-0001.patch>
More information about the distro-pkg-dev
mailing list