From 0b0356f43c6300920490daf091640a76b88060b1 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Thu, 19 Feb 2015 20:06:43 +0100 Subject: [PATCH] Use alias instead of exported function for which to avoid bashism, http://unix.stackexchange.com/questions/59360/#59431 --- which.spec | 6 +++++- which2.sh | 6 +----- 2 files changed, 6 insertions(+), 6 deletions(-) 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'