diff --git a/which.spec b/which.spec index 0aa25ab..ba1513b 100644 --- a/which.spec +++ b/which.spec @@ -1,7 +1,7 @@ Summary: Displays where a particular program in your path is located Name: which Version: 2.20 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv3 Group: Applications/System Source0: http://www.xs4all.nl/~carlo17/which/%{name}-%{version}.tar.gz @@ -60,6 +60,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/* %changelog +* Thu Feb 19 2015 Till Maas - 2.20-10 +- Use alias instead of exported function for which to avoid bashism, +http://unix.stackexchange.com/questions/59360/#59431 + * Wed Feb 18 2015 Till Maas - 2.20-9 - Check functions (#1194044) - Use %%license diff --git a/which2.sh b/which2.sh index ea517c2..234861e 100644 --- a/which2.sh +++ b/which2.sh @@ -1,8 +1,4 @@ # Initialization script for bash and sh # export AFS if you are in AFS environment -which () -{ - (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot "$@" -} -export -f which +alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'