Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
# DO NOT EDIT THIS FILE IT WILL BE OVERWRITTEN ON UPDATE
|
|
|
|
#
|
2018-09-01 06:02:56 +08:00
|
|
|
# Add portable user customizations ${CMDER_ROOT}/config/user_profile.sh,
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
# these customizations will follow Cmder if $CMDER_ROOT is copied
|
|
|
|
# to another machine.
|
|
|
|
#
|
2018-04-06 06:00:11 +08:00
|
|
|
# Add system specific users customizations to $HOME/.bashrc, these
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
# customizations will not follow Cmder to another machine.
|
|
|
|
|
2018-03-13 23:38:27 +08:00
|
|
|
function runProfiled {
|
|
|
|
unset profile_d_scripts
|
|
|
|
pushd "${1}" >/dev/null
|
|
|
|
profile_d_scripts=$(ls *.sh 2>/dev/null)
|
|
|
|
|
|
|
|
if [ ! "x${profile_d_scripts}" = "x" ] ; then
|
|
|
|
for x in ${profile_d_scripts} ; do
|
2018-04-04 01:20:49 +08:00
|
|
|
# echo Sourcing "${1}/${x}"...
|
2018-03-13 23:38:27 +08:00
|
|
|
. "${1}/${x}"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
popd >/dev/null
|
|
|
|
}
|
|
|
|
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
# We do this for bash as admin sessions since $CMDER_ROOT is not being set
|
|
|
|
if [ "$CMDER_ROOT" == "" ] ; then
|
|
|
|
case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac
|
|
|
|
else
|
|
|
|
case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove any trailing '/'
|
|
|
|
CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::')
|
|
|
|
|
|
|
|
export CMDER_ROOT
|
|
|
|
|
|
|
|
if [ -d "/c/Program Files/Git" ] ; then
|
|
|
|
GIT_INSTALL_ROOT="/c/Program Files/Git"
|
|
|
|
elif [ -d "/c/Program Files(x86)/Git" ] ; then
|
|
|
|
GIT_INSTALL_ROOT="/c/Program Files(x86)/Git"
|
|
|
|
elif [ -d "${CMDER_ROOT}/vendor/git-for-windows" ] ; then
|
|
|
|
GIT_INSTALL_ROOT=${CMDER_ROOT}/vendor/git-for-windows
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! "$PATH" =~ "${GIT_INSTALL_ROOT}/bin:" ]] ; then
|
2021-11-07 23:54:33 +08:00
|
|
|
PATH="${GIT_INSTALL_ROOT}/bin:$PATH"
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
fi
|
|
|
|
|
2021-11-07 23:54:33 +08:00
|
|
|
PATH="${CMDER_ROOT}/bin:${CMDER_ROOT}/vendor/bin:$PATH:${CMDER_ROOT}"
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
|
|
|
|
export PATH
|
|
|
|
|
2016-02-28 02:19:03 +08:00
|
|
|
# Drop *.sh or *.zsh files into "${CMDER_ROOT}\config\profile.d"
|
|
|
|
# to source them at startup.
|
|
|
|
if [ ! -d "${CMDER_ROOT}/config/profile.d" ] ; then
|
2016-08-21 07:01:46 +08:00
|
|
|
mkdir -p "${CMDER_ROOT}/config/profile.d"
|
2016-02-25 21:53:57 +08:00
|
|
|
fi
|
|
|
|
|
2016-02-28 02:19:03 +08:00
|
|
|
if [ -d "${CMDER_ROOT}/config/profile.d" ] ; then
|
2018-03-13 23:38:27 +08:00
|
|
|
runProfiled "${CMDER_ROOT}/config/profile.d"
|
|
|
|
fi
|
2016-02-28 02:19:03 +08:00
|
|
|
|
2018-03-13 23:38:27 +08:00
|
|
|
if [ -d "${CMDER_USER_CONFIG}/profile.d" ] ; then
|
|
|
|
runProfiled "${CMDER_USER_CONFIG}/profile.d"
|
2016-02-28 02:19:03 +08:00
|
|
|
fi
|
2016-02-25 21:53:57 +08:00
|
|
|
|
2018-09-01 06:02:56 +08:00
|
|
|
|
|
|
|
# Renaming to "config\user_profile.sh" to "user_profile.sh" for consistency.
|
|
|
|
if [ -f "$CMDER_ROOT/config/user-profile.sh" ] ; then
|
|
|
|
mv "$CMDER_ROOT/config/user-profile.sh" "$CMDER_ROOT/config/user_profile.sh"
|
|
|
|
fi
|
|
|
|
|
|
|
|
CmderUserProfilePath="${CMDER_ROOT}/config/user_profile.sh"
|
|
|
|
if [ -f "${CMDER_ROOT}/config/user_profile.sh" ] ; then
|
|
|
|
. "${CMDER_ROOT}/config/user_profile.sh"
|
2018-03-13 23:38:27 +08:00
|
|
|
fi
|
|
|
|
|
2018-04-04 01:20:49 +08:00
|
|
|
if [ "${CMDER_USER_CONFIG}" != "" ] ; then
|
2018-09-01 06:02:56 +08:00
|
|
|
# Renaming to "config\user_profile.sh" to "user_profile.sh" for consistency.
|
|
|
|
if [ -f "$CMDER_USER_CONFIG/user-profile.sh" ] ; then
|
|
|
|
mv "$CMDER_USER_CONFIG/user-profile.sh" "$CMDER_USER_CONFIG/user_profile.sh"
|
|
|
|
fi
|
|
|
|
|
2021-11-07 23:54:33 +08:00
|
|
|
export PATH="${CMDER_USER_CONFIG}/bin:$PATH"
|
2018-11-02 21:00:41 +08:00
|
|
|
|
2018-09-01 06:02:56 +08:00
|
|
|
CmderUserProfilePath="${CMDER_USER_CONFIG}/user_profile.sh"
|
|
|
|
if [ -f "${CMDER_USER_CONFIG}/user_profile.sh" ] ; then
|
|
|
|
. "${CMDER_USER_CONFIG}/user_profile.sh"
|
2018-04-04 01:20:49 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-09-01 06:02:56 +08:00
|
|
|
if [ ! -f "${CmderUserProfilePath}" ] ; then
|
|
|
|
echo Creating user startup file: "${CmderUserProfilePath}"
|
2018-12-14 04:13:17 +08:00
|
|
|
cp "${CMDER_ROOT}/vendor/user_profile.sh.default" "${CmderUserProfilePath}"
|
Added/enhanced bash with cmder.sh/user-cmder.sh, organized tasks menu
added personal files to .gitignore so they never get uploaded to the repo and added support for msys2 bash in the new git for windows
added autocreate of config/user-cmder.sh if iot does not exist and added it to the .gitignore
Added tasks: cmd::Cmder, cmd::Cmder as Admin, bash::bash, bash::bash as Admin, bash::mintty, bash::mintty as admin, powershell::powershell, powershell::powershell as Admin. Set default task to cmd::Cmder. Cot rid of init.bat running before /bin/bash, fixes double exit requirement
Added running git for windows post-install.bat on first cmder launch
fixed file/path not found errors when launching powershell as admin
fixed file/path not found errors when launching bash/mintty as admin
fixed PATH in vendor/cmder.sh
Added sourcing ~/.bashrc if it exists.
changed .gitignore to ignore anything with path of config/user-*
removed my personal files from .gitignore, left in config/user-*
Make sure $CMDER_ROOT does not have a trailing '/'
%CMDER_ROOT% does not have trailing '\'. allow user to specify a conemu.xml on the command line
Removed '\' from %CMDER_ROOT%
2015-11-09 11:25:42 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Source the users .bashrc file if it exists
|
|
|
|
if [ -f "${HOME}/.bashrc" ] ; then
|
|
|
|
. "${HOME}/.bashrc"
|
|
|
|
fi
|