Use alias instead of exported function for which to avoid bashism,

http://unix.stackexchange.com/questions/59360/#59431
This commit is contained in:
Till Maas 2015-02-19 20:06:43 +01:00
parent aa89ac84da
commit 0b0356f43c
2 changed files with 6 additions and 6 deletions

View File

@ -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 <opensource@till.name> - 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 <opensource@till.name> - 2.20-9
- Check functions (#1194044)
- Use %%license

View File

@ -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'