Breaking it down 

function hint() {
    test -n "$*" && \
        sed -n "/$*/Is/^\([^:]*:\) *\(.*\)$/\1\n\2\n/p" \
            $HOME/.common-configs/hints
}