Allow zsh to work as our shell
This commit is contained in:
parent
e983dd0ac6
commit
42a5cb043b
@ -153,7 +153,7 @@ stop() {
|
|||||||
# NO_UMOUNTS is taken from /etc/conf.d/localmount
|
# NO_UMOUNTS is taken from /etc/conf.d/localmount
|
||||||
# RC_NO_UMOUNTS is taken from /etc/conf.d/rc and can also be
|
# RC_NO_UMOUNTS is taken from /etc/conf.d/rc and can also be
|
||||||
# set by plugins
|
# set by plugins
|
||||||
local OIFS=$IFS SIFS=${IFS-y}
|
OIFS=${IFS} SIFS=${IFS-y}
|
||||||
IFS=$IFS:
|
IFS=$IFS:
|
||||||
for x in ${NO_UMOUNTS} ${RC_NO_UMOUNTS} ; do
|
for x in ${NO_UMOUNTS} ${RC_NO_UMOUNTS} ; do
|
||||||
no_umounts="${no_umounts}|${x}"
|
no_umounts="${no_umounts}|${x}"
|
||||||
|
@ -119,6 +119,16 @@ KV_to_int() {
|
|||||||
echo "${KV_int}"
|
echo "${KV_int}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Allow our scripts to support zsh
|
||||||
|
if [ -n "${ZSH_VERSION}" ] ; then
|
||||||
|
emulate sh
|
||||||
|
NULLCMD=:
|
||||||
|
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
|
||||||
|
# is contrary to our usage. Disable this feature.
|
||||||
|
alias -g '${1+"$@"}'='"$@"'
|
||||||
|
setopt NO_GLOB_SUBST
|
||||||
|
fi
|
||||||
|
|
||||||
# Setup a basic $PATH. Just add system default to existing.
|
# Setup a basic $PATH. Just add system default to existing.
|
||||||
# This should solve both /sbin and /usr/sbin not present when
|
# This should solve both /sbin and /usr/sbin not present when
|
||||||
# doing 'su -c foo', or for something like: PATH= rcscript start
|
# doing 'su -c foo', or for something like: PATH= rcscript start
|
||||||
|
Loading…
Reference in New Issue
Block a user