Bug is described here: https://github.com/vmware/photon/issues/730
Added condition to /etc/profile.d/bash_completion.sh to check for
bash.
Change-Id: I701b834bce51399fcf1081711d874ec39af182e5
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4698
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
(cherry picked from commit e693f33046818e625dd33411216b41970ed4b107)
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4715
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
Summary: Bourne-Again SHell |
| 2 | 2 |
Name: bash |
| 3 | 3 |
Version: 4.4.12 |
| 4 |
-Release: 2%{?dist}
|
|
| 4 |
+Release: 3%{?dist}
|
|
| 5 | 5 |
License: GPLv3 |
| 6 | 6 |
URL: http://www.gnu.org/software/bash/ |
| 7 | 7 |
Group: System Environment/Base |
| ... | ... |
@@ -159,12 +159,17 @@ EOF |
| 159 | 159 |
|
| 160 | 160 |
# bash completion |
| 161 | 161 |
cat > %{buildroot}/etc/profile.d/bash_completion.sh << "EOF"
|
| 162 |
+# check for interactive bash and only bash |
|
| 163 |
+if [ -n "$BASH_VERSION" -a -n "$PS1" ]; then |
|
| 164 |
+ |
|
| 162 | 165 |
# enable bash completion in interactive shells |
| 163 | 166 |
if ! shopt -oq posix; then |
| 164 | 167 |
if [ -f /usr/share/bash-completion/bash_completion ]; then |
| 165 | 168 |
. /usr/share/bash-completion/bash_completion |
| 166 | 169 |
fi |
| 167 | 170 |
fi |
| 171 |
+ |
|
| 172 |
+fi |
|
| 168 | 173 |
EOF |
| 169 | 174 |
|
| 170 | 175 |
cat > %{buildroot}/etc/bash.bashrc << "EOF"
|
| ... | ... |
@@ -343,6 +348,8 @@ fi |
| 343 | 343 |
%defattr(-,root,root) |
| 344 | 344 |
|
| 345 | 345 |
%changelog |
| 346 |
+* Fri Jan 26 2018 Alexey Makhalov <amakhalov@vmware.com> 4.4.12-3 |
|
| 347 |
+- Run bash_completion only for bash interactive shell |
|
| 346 | 348 |
* Mon Dec 11 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.12-2 |
| 347 | 349 |
- conditionally apply grep color alias |
| 348 | 350 |
* Mon Nov 13 2017 Xiaolin Li <xiaolinl@vmware.com> 4.4.12-1 |