File: javaws.bash.in

package info (click to toggle)
icedtea-web 1.8.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,400 kB
  • sloc: java: 101,426; cpp: 8,561; javascript: 4,297; makefile: 2,367; sh: 500; xml: 50
file content (31 lines) | stat: -rw-r--r-- 791 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
_javaws()
{
    local cur prev opts base
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"

    # JavaWs Options
    opts="@OPTIONS@"
    if [[ $prev == *"-jnlp" || $prev == *"-html" ]] ; then
      COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
      if [ -d "$COMPREPLY" ] ; then
        COMPREPLY="$COMPREPLY/"
      fi
      return 0
    fi
    if [[ $cur == "" ]] ; then	
      COMPREPLY=($(compgen -W "aa_file_or_url ${opts} zz_file_or_url" -- ${cur}))
      return 0
    fi
    if [[ $cur == "-"* ]] ; then	
      COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
      return 0
    else
      COMPREPLY=($(compgen -f -X "!*" -- ${cur}))
      if [ -d "$COMPREPLY" ] ; then
        COMPREPLY="$COMPREPLY/"
      fi
      return 0
    fi
}
complete -F _javaws javaws