committing changes in /etc made by "-bash"
Package changes:
This commit is contained in:
@@ -1,18 +1,27 @@
|
||||
# shellcheck shell=sh
|
||||
# Initialization script for bash, sh, mksh and ksh
|
||||
|
||||
which_declare="declare -f"
|
||||
which_opt="-f"
|
||||
which_shell="$(cat /proc/$$/comm)"
|
||||
case "$(basename $(readlink /proc/$$/exe))" in
|
||||
*ksh*)
|
||||
which_declare=""
|
||||
which_opt=""
|
||||
;;
|
||||
zsh)
|
||||
which_declare="typeset -f"
|
||||
which_opt=""
|
||||
;;
|
||||
bash|sh)
|
||||
which_declare="declare -f"
|
||||
which_opt="-f"
|
||||
;;
|
||||
*)
|
||||
which_declare=""
|
||||
which_opt=""
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$which_shell" = "ksh" ] || [ "$which_shell" = "mksh" ] || [ "$which_shell" = "zsh" ] ; then
|
||||
which_declare="typeset -f"
|
||||
which_opt=""
|
||||
fi
|
||||
|
||||
which ()
|
||||
{
|
||||
(alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot "$@"
|
||||
which () {
|
||||
(alias; eval ${which_declare}) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
|
||||
}
|
||||
|
||||
export which_declare
|
||||
|
||||
Reference in New Issue
Block a user