~ubuntu-branches/ubuntu/vivid/bash-completion/vivid-proposed

« back to all changes in this revision

Viewing changes to contrib/monodevelop

  • Committer: Package Import Robot
  • Author(s): Angel Abad
  • Date: 2011-02-08 09:39:13 UTC
  • mfrom: (5.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20110208093913-89h9hx9eq5j7vjpw
Tags: 1:1.3-1ubuntu1
* Merge from debian unstable. (LP: #715057) Remaining changes:
  - debian/patches/disable-avahi-browse.diff: Disable avahi-browse since
    it scales poorly in the current form:
    + Refresh patch
  - debian/patches/apt-get-changelog.patch:
    + Re-work patch because contrib dir no longer exists in upstream
      distribution.
* Dropped chages, applied upstream:
  - Fix p4 completion
  - Fix typo in openssl completion
  - Fix error while loading service(8) completions

Show diffs side-by-side

added added

removed removed

Lines of Context:
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