From 1784ef6a01853d2f68720539b5cab604d332d378 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Tue, 26 Oct 2021 18:03:43 +0200 Subject: [PATCH] disable the --read-functions option in korn shells --- which.spec | 5 ++++- which2.sh | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/which.spec b/which.spec index 4424768..474b530 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.21 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv3 Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz Source1: which2.sh @@ -41,6 +41,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %{_mandir}/man1/which.1* %changelog +* Tue Oct 26 2021 Than Ngo - 2.21-30 +- disable the --read-functions option in korn shells + * Fri Oct 15 2021 Than Ngo - 2.21-29 - Fixed regression, use export instead alias diff --git a/which2.sh b/which2.sh index 610a415..ae2a254 100644 --- a/which2.sh +++ b/which2.sh @@ -3,7 +3,7 @@ case "$(cat /proc/$$/comm)" in ksh|mksh) - which_declare="typeset -fS" + which_declare="" which_opt="" ;; zsh) @@ -17,7 +17,7 @@ zsh) esac which () { - (alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@ + (alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@ } export which_declare