aboutsummaryrefslogtreecommitdiff
path: root/plenv/shrc.d/plenv.sh
blob: 938bcbf645db2740872701f676d10b207f9c0f3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# POSIX-compatible version of the plenv Bash shell wrapper
plenv() {
    case $1 in
        rehash)
            shift
            eval "$(plenv sh-rehash "$@")"
            ;;
        sh-rehash)
            command plenv "$@"
            ;;
        shell)
            shift
            eval "$(plenv sh-shell "$@")"
            ;;
        *)
            command plenv "$@"
            plenv rehash
            ;;
    esac
}