Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
#  IBM IPR adapter configuration utility
2
#
3
#  (C) Copyright 2000, 2015
4
#  International Business Machines Corporation and others.
5
#  All Rights Reserved. This program and the accompanying
6
#  materials are made available under the terms of the
7
#  Common Public License v1.0 which accompanies this distribution.
8
 
9
_comp_iprconfig () {
10
    iprconfig="${COMP_WORDS[0]}"
11
    cur="${COMP_WORDS[COMP_CWORD]}"
12
    prev="${COMP_WORDS[COMP_CWORD-1]}"
13
 
14
    case "${prev}" in
15
	"-c")
16
	    opts=$(${iprconfig} -l 2>/dev/null)
17
	    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
18
	    ;;
19
	"-k")
20
	    COMPREPLY=( $(compgen -o dirnames -- ${cur}) )
21
	    ;;
22
	*)
23
	    opts=$(find /dev -printf "%f\n" | grep -G "^\(sd\|sg\)")
24
	    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
25
	    ;;
26
    esac
27
    return 0;
28
}
29
complete -F _comp_iprconfig iprconfig