summaryrefslogtreecommitdiffstats
path: root/config/sh/functions
blob: a662f2dc84710ed8533f1776913b235e195c2508 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function perldoc {
    # XXX bash specific
    if type cpandoc > /dev/null 2>&1; then
        cpandoc "$@"
    else
        command perldoc "$@"
    fi
}

function cdu {
    local root
    root="$(git rev-parse --show-superproject-working-tree 2>/dev/null)"
    if [ -n "$root" ]; then
        cd "$root" || return
    else
        cd "$(git rev-parse --show-toplevel)" || return
    fi
}

# vim:ft=sh: