Description of Problem: /etc/profile.d/which-2.sh set alias for all shells executing the script, not just bash. All other scripts under /etc/profile.d set aliases only for bash. Version-Release number of selected component (if applicable): which-2.12-3 How Reproducible: Always. Steps to Reproduce: 1. Execute the script under ksh/zsh/... Actual Results: Alias is set. Expected Results: Alias is not set. Additional Information: Use this script instead: if echo $SHELL |grep bash 2>&1 >/dev/null; then # aliases are bash only # Initialization script for bash and sh alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' fi
It's correct that alias is activated in ksh and zsh.