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 / monodevelop < prev    next >
Encoding:
Text File  |  2010-11-16  |  2.5 KB  |  86 lines

  1. # Monodevelop completion
  2.  
  3. have monodevelop &&
  4. _monodevelop()
  5. {
  6.     local cur
  7.     _get_comp_words_by_ref cur
  8.  
  9.     if [[ "$cur" == -* ]]; then
  10.         COMPREPLY=( $( compgen -W '-? -help -help2 -ipc-tcp -newwindow -nologo \
  11.             -usage -V -version' -- "$cur" ) )
  12.     else
  13.         _filedir
  14.     fi
  15.     return 0
  16. } &&
  17. complete -F _monodevelop monodevelop
  18.  
  19. have mdtool &&
  20. _mdtool()
  21. {
  22.     local cur prev command i
  23.  
  24.     COMPREPLY=()
  25.  
  26.     _get_comp_words_by_ref cur prev
  27.  
  28.     for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
  29.         if [[ ${COMP_WORDS[i]} == @(build|generate-makefiles|setup) ]]; then
  30.             command=${COMP_WORDS[i]}
  31.         fi
  32.     done
  33.  
  34.     if [[ -n "$command" ]]; then
  35.         case $command in
  36.             "build")
  37.                 COMPREPLY=( $( compgen -W '--f --buildfile --p --project' \
  38.                     -S":" -- "$cur" ) )
  39.                 # TODO: This does not work :(
  40.                 #if [[ "$prev" == *: ]]; then
  41.                 #   case $prev in
  42.                 #       @(--p:|--project:))
  43.                 #           COMPREPLY=( $( compgen -f -G "*.mdp" -- "$cur" ) )
  44.                 #           ;;
  45.                 #       @(--f:|--buildfile:))
  46.                 #           COMPREPLY=( $( compgen -f -G "*.mdp" -G "*.mds" -- "$cur" ) )
  47.                 #           ;;
  48.                 #   esac
  49.                 #fi
  50.                 return 0
  51.                 ;;
  52.             "generate-makefiles")
  53.                 COMPREPLY=( $( compgen -o filenames -G"*.mds" -- "$cur" ) )
  54.                 if [[ "$prev" == *mds ]]; then
  55.                     COMPREPLY=( $( compgen -W '--simple-makefiles --s --d:' \
  56.                         -- "$cur" ) )
  57.                 fi
  58.                 return 0
  59.                 ;;
  60.             "setup")
  61.                 # TODO: at least return filenames after these options.
  62.                 COMPREPLY=( $( compgen -W 'install i uninstall u check-install \
  63.                     ci update up list l list-av la list-update lu rep-add ra \
  64.                     rep-remove rr rep-update ru rep-list rl reg-update \
  65.                     reg-build rgu info rep-build rb pack p help h dump-file' \
  66.                     -- "$cur" ) )
  67.                 return 0
  68.                 ;;
  69.         esac
  70.     fi
  71.  
  72.     COMPREPLY=( $( compgen -W 'gsetup build dbgen project-export \
  73.         generate-makefiles gettext-update setup -q' -- "$cur" ) )
  74.  
  75.     return 0
  76. } &&
  77. complete -F _mdtool -o filenames mdtool
  78.  
  79. # Local variables:
  80. # mode: shell-script
  81. # sh-basic-offset: 4
  82. # sh-indent-comment: t
  83. # indent-tabs-mode: nil
  84. # End:
  85. # ex: ts=4 sw=4 et filetype=sh
  86.