summaryrefslogtreecommitdiff
blob: 7453ed4330f4db0c6669903bc9c8c07a6165af2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Gentoo Linux Bash Shell Command Completion
#
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later

#
# rc completion command
#
_rc()
{
    local cur
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    if [[ ${#COMP_WORDS[*]} -le 2 ]]; then
    COMPREPLY=($(compgen -W "$(for i in @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/*; do echo ${i##*/}; done)" -- $cur))
    fi
    return 0
} &&
complete -F _rc rc

# vim: ft=sh:et:ts=4:sw=4:tw=80