From: Nicolas Boisselier Date: Tue, 19 Feb 2019 01:39:15 +0000 (+0000) Subject: etc/profile.d/functions X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=f69d286db0b1169321009cb8fc2a288872483218;p=nb.git etc/profile.d/functions --- diff --git a/etc/profile.d/functions b/etc/profile.d/functions index cb7de0b5..5b6b2216 100755 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -3,6 +3,8 @@ # FUNCTIONS - CORE # ################################################################################# +type -P which > /dev/null || which() { type -P "$1" 2>&1; } + nb_repos() { [ -z "$FUNCNAME" ] && local FUNCNAME='nb_repos' # for busybox ( @@ -692,15 +694,6 @@ password_create() { echo } -# Missing sometimes by default -if ! type which >/dev/null 2>&1; then - -which() { - type "$1" 2>&1 -} - -fi - #unset _which_cache _which_cache="" which_cache() {