@@ -358,6 +358,12 @@ if is_zsh_strict; then
358358else
359359 fn_aliased_exists () { LC_ALL=C alias $1 1> /dev/null 2>&1 ; }
360360fi
361+ if fn_defined which; then
362+ : # dbg "'which' has been defined."
363+ else
364+ which () { cmd_exists " $@ " ; }
365+ fi
366+ which2 () { [ " $( whereis -b $1 | awk ' {print $2}' ) " != " " ]; }
361367fn_name () {
362368 is_zsh && local fn_=" ${funcstack[2]} "
363369 if [ " $fn_ " = " " ]; then
@@ -594,12 +600,12 @@ is_bsd_series() { [[ "$(osid)" == *bsd* ]]; }
594600#
595601#
596602#
597- lsb_release_cs () { which lsb_release 1> /dev/null 2>&1 && lsb_release -cs; } # focal, ... # = oscodename
598- uname_kernel () { uname -s; } # Linux
599- uname_cpu () { uname -p; } # processor: x86_64
600- uname_mach () { uname -m; } # machine: x86_64, ...
601- uname_rev () { uname -r; } # kernel-release: 5.8.15-301.fc33.x86_64
602- uname_ver () { uname -v; } # kernel-version:
603+ lsb_release_cs () { cmd_exists lsb_release && lsb_release -cs; } # focal, ... # = oscodename
604+ uname_kernel () { uname -s; } # Linux
605+ uname_cpu () { uname -p; } # processor: x86_64
606+ uname_mach () { uname -m; } # machine: x86_64, ...
607+ uname_rev () { uname -r; } # kernel-release: 5.8.15-301.fc33.x86_64
608+ uname_ver () { uname -v; } # kernel-version:
603609lscpu_call () { lscpu $* ; }
604610lshw_cpu () { $SUDO lshw -c cpu; }
605611i386_amd64 () {
@@ -1222,11 +1228,6 @@ subnet_hex() {
12221228 # tip "lanip: '$(lanip)'"
12231229 lanip | tox1
12241230}
1225- if fn_defined which; then
1226- dbg " 'which' has been defined."
1227- else
1228- which () { whereis " $@ " ; }
1229- fi
12301231if is_darwin; then
12311232 readlinkx () {
12321233 local p=" $@ "
0 commit comments