home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / rdesktop < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.5 KB  |  58 lines

  1. # bash completion for rdesktop
  2.  
  3. have rdesktop &&
  4. _rdesktop()
  5. {
  6.     local cur prev
  7.  
  8.     COMPREPLY=()
  9.     _get_comp_words_by_ref cur prev
  10.  
  11.     case $prev in
  12.         -k)
  13.             COMPREPLY=( $( command ls \
  14.                 /usr/share/rdesktop/keymaps 2>/dev/null | \
  15.                 command grep -E -v '(common|modifiers)' ) )
  16.             COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \
  17.                 $HOME/.rdesktop/keymaps 2>/dev/null ) )
  18.             COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \
  19.                 ./keymaps 2>/dev/null ) )
  20.             COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- "$cur" ) )
  21.             return 0
  22.             ;;
  23.         -a)
  24.             COMPREPLY=( $( compgen -W '8 15 16 24' -- "$cur" ) )
  25.             return 0
  26.             ;;
  27.         -x)
  28.             COMPREPLY=( $( compgen -W 'b broadband m modem l lan' \
  29.                 -- $cur ) )
  30.             return 0
  31.             ;;
  32.         -r)
  33.             # FIXME: should do -o nospace for the colon options
  34.             COMPREPLY=( $( compgen -W 'comport: disk: lptport: \
  35.                 printer: sound: lspci scard' -- "$cur" ) )
  36.             return 0
  37.             ;;
  38.     esac
  39.  
  40.     if [[ "$cur" == -* ]]; then
  41.         COMPREPLY=( $( compgen -W '-u -d -s -c -p -n -k -g -f -b -L \
  42.             -A -B -e -E -m -C -D -K -S -T -N -X -a -z -x -P -r \
  43.             -0 -4 -5' -- "$cur" ) )
  44.     else
  45.         _known_hosts_real "$cur"
  46.     fi
  47.  
  48. } &&
  49. complete -F _rdesktop rdesktop
  50.  
  51. # Local variables:
  52. # mode: shell-script
  53. # sh-basic-offset: 4
  54. # sh-indent-comment: t
  55. # indent-tabs-mode: nil
  56. # End:
  57. # ex: ts=4 sw=4 et filetype=sh
  58.