Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bash login when $CMDER_ROOT has spaces #1078

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions vendor/cmder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ export PATH
# Drop *.sh or *.zsh files into "${CMDER_ROOT}\config\profile.d"
# to source them at startup.
if [ ! -d "${CMDER_ROOT}/config/profile.d" ] ; then
mkdir -p ${CMDER_ROOT}/config/profile.d
mkdir -p "${CMDER_ROOT}/config/profile.d"
fi

if [ -d "${CMDER_ROOT}/config/profile.d" ] ; then
unset profile_d_scripts
pushd ${CMDER_ROOT}/config/profile.d >/dev/null
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.sh 2>/dev/null)
pushd "${CMDER_ROOT}/config/profile.d" >/dev/null
profile_d_scripts=$(ls *.sh 2>/dev/null)

if [ ! "x${profile_d_scripts}" = "x" ] ; then
for x in ${profile_d_scripts} ; do
# echo Sourcing "${x}"...
. $x
# echo Sourcing "${CMDER_ROOT}/config/profile.d/${x}"...
. "${CMDER_ROOT}/config/profile.d/${x}"
done
fi
popd >/dev/null
fi

if [ -f ${CMDER_ROOT}/config/user-profile.sh ] ; then
. ${CMDER_ROOT}/config/user-profile.sh
if [ -f "${CMDER_ROOT}/config/user-profile.sh" ] ; then
. "${CMDER_ROOT}/config/user-profile.sh"
else
echo Creating user startup file: "${CMDER_ROOT}/config/user-profile.sh"
cat <<-eof >"${CMDER_ROOT}/config/user-profile.sh"
Expand Down
16 changes: 8 additions & 8 deletions vendor/cmder_exinit
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,29 @@ if [ ! "$CMDER_ROOT" = "" ] ; then
# Drop *.sh or *.zsh files into "${CMDER_ROOT}\config\profile.d"
# to source them at startup.
if [ ! -d "${CMDER_ROOT}/config/profile.d" ] ; then
mkdir -p ${CMDER_ROOT}/config/profile.d
mkdir -p "${CMDER_ROOT}/config/profile.d"
fi

if [ -d "${CMDER_ROOT}/config/profile.d" ] ; then
unset profile_d_scripts
pushd ${CMDER_ROOT}/config/profile.d >/dev/null
pushd "${CMDER_ROOT}/config/profile.d" >/dev/null
if [ ! "x${ZSH_VERSION}" = "x" ]; then
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.zsh 2>/dev/null)
profile_d_scripts=$(ls *.zsh 2>/dev/null)
elif [ ! "x${BASH_VERSION}" = "x" ]; then
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.sh 2>/dev/null)
profile_d_scripts=$(ls *.sh 2>/dev/null)
fi

if [ ! "x${profile_d_scripts}" = "x" ] ; then
for x in ${profile_d_scripts} ; do
# echo Sourcing "${x}"...
. $x
# echo Sourcing "${CMDER_ROOT}/config/profile.d/${x}"...
. "${CMDER_ROOT}/config/profile.d/${x}"
done
fi
popd >/dev/null
fi

if [ -f ${CMDER_ROOT}/config/user-profile.sh ] ; then
. ${CMDER_ROOT}/config/user-profile.sh
if [ -f "${CMDER_ROOT}/config/user-profile.sh" ] ; then
. "${CMDER_ROOT}/config/user-profile.sh"
else
echo Creating user startup file: "${CMDER_ROOT}/config/user-profile.sh"
cat <<-eof >"${CMDER_ROOT}/config/user-profile.sh"
Expand Down