import which-2.21-16.el8
This commit is contained in:
parent
545bf93e25
commit
6e9cfbd57f
@ -1,18 +1,19 @@
|
|||||||
# shellcheck shell=sh
|
# shellcheck shell=sh
|
||||||
# Initialization script for bash, sh, mksh and ksh
|
# Initialization script for bash, sh, mksh and ksh
|
||||||
|
|
||||||
_declare="declare -f"
|
which_declare="declare -f"
|
||||||
_opt="-f"
|
which_opt="-f"
|
||||||
_shell="$(basename $SHELL)"
|
which_shell="$(cat /proc/$$/comm)"
|
||||||
|
|
||||||
if [ "$_shell" = "ksh" ] || [ "$_shell" = "mksh" ] || [ "$_shell" = "zsh" ] ; then
|
if [ "$which_shell" = "ksh" ] || [ "$which_shell" = "mksh" ] || [ "$which_shell" = "zsh" ] ; then
|
||||||
_declare="typeset -f"
|
which_declare="typeset -f"
|
||||||
_opt=""
|
which_opt=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which ()
|
which ()
|
||||||
{
|
{
|
||||||
(alias; eval ${_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 ${_opt} which
|
export which_declare
|
||||||
|
export ${which_opt} which
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Displays where a particular program in your path is located
|
Summary: Displays where a particular program in your path is located
|
||||||
Name: which
|
Name: which
|
||||||
Version: 2.21
|
Version: 2.21
|
||||||
Release: 14%{?dist}
|
Release: 16%{?dist}
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
|
Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz
|
||||||
Source1: which2.sh
|
Source1: which2.sh
|
||||||
@ -41,6 +41,13 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|||||||
%{_mandir}/man1/which.1*
|
%{_mandir}/man1/which.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 05 2021 Than Ngo <than@redhat.com> - 2.21-16
|
||||||
|
- Related: #1940468, fixed unbound variable
|
||||||
|
|
||||||
|
|
||||||
|
* Fri Apr 30 2021 Than Ngo <than@redhat.com> - 2.21-15
|
||||||
|
- Related: #1940468, fix error when the user runs which in bash with strict bash environment
|
||||||
|
|
||||||
* Tue Mar 23 2021 Than Ngo <than@redhat.com> - 2.21-14
|
* Tue Mar 23 2021 Than Ngo <than@redhat.com> - 2.21-14
|
||||||
- Related: #1940468, fix regression if SHELL=zsh
|
- Related: #1940468, fix regression if SHELL=zsh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user