Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
 
2
# Check for bash
3
[ -z "$BASH_VERSION" ] && return
4
 
5
####################################################################################################
6
 
7
__udisks() {
8
    local IFS=$'\n'
9
    local cur="${COMP_WORDS[COMP_CWORD]}"
10
 
11
    if [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--show-info" ] ; then
12
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
13
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--inhibit-polling" ] ; then
14
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
15
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--mount" ] ; then
16
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
17
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--unmount" ] ; then
18
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
19
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--detach" ] ; then
20
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
21
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--ata-smart-refresh" ] ; then
22
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
23
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--ata-smart-simulate" ] ; then
24
        _filedir || return 0
25
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--set-spindown" ] ; then
26
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
27
    elif [ "${COMP_WORDS[$(($COMP_CWORD - 1))]}" = "--poll-for-media" ] ; then
28
        COMPREPLY=($(compgen -W "$(udisks --enumerate-device-files)" -- $cur))
29
    else
30
        COMPREPLY=($(IFS=: compgen -W "--dump:--inhibit-polling:--inhibit-all-polling:--enumerate:--enumerate-device-files:--monitor:--monitor-detail:--show-info:--help:--mount:--mount-fstype:--mount-options:--unmount:--unmount-options:--detach:--detach-options:--ata-smart-refresh:--ata-smart-wakeup:--ata-smart-simulate:--set-spindown:--set-spindown-all:--spindown-timeout:--poll-for-media" -- $cur))
31
    fi
32
}
33
 
34
####################################################################################################
35
 
36
complete -o filenames -F __udisks udisks