diff --git a/.gitignore b/.gitignore index 71475ec9e..3ca812444 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,10 @@ launcher/src/version.rc2 .vs/* .vscode .idea +.vagrant/ +scripts/packer/iso/*.iso +!scripts/packer/floppy/*.exe +scripts/packer/packer_cache +scripts/packer/output-* +*.box + diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b22a1917..9e512fe4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## [UNRELEASED](https://github.com/cmderdev/cmder/tree/master) (2022-06-05) + +### Adds + +- Cmder Mini + - Launching Git Bash from external Git for Windows install. + +### Changes + +- Update Git Prompt with changes from Git for Windows + ## [1.3.20](https://github.com/cmderdev/cmder/tree/v1.3.20) (2022-03-18) ### Changes diff --git a/vendor/ConEmu.xml.default b/vendor/ConEmu.xml.default index a4e5cc1fb..afd5fb3d1 100644 --- a/vendor/ConEmu.xml.default +++ b/vendor/ConEmu.xml.default @@ -1,7 +1,7 @@ - + @@ -42,8 +42,8 @@ - - + + @@ -58,7 +58,7 @@ - + @@ -78,7 +78,6 @@ - @@ -113,13 +112,13 @@ - + - + - + @@ -128,8 +127,8 @@ - - + + @@ -166,19 +165,19 @@ - + - + - + - + @@ -413,15 +412,15 @@ - + - + - + @@ -484,12 +483,12 @@ - - + + - - + + @@ -497,8 +496,8 @@ - - + + @@ -507,8 +506,8 @@ - - + + @@ -516,61 +515,78 @@ - - - + + + - + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + - - + - + + - - + - - + + - + - + - @@ -676,7 +692,7 @@ - + @@ -845,13 +861,13 @@ - - + + - + - + @@ -869,10 +885,16 @@ + + + + + + - - + + @@ -902,6 +924,15 @@ + + + + + + + + + diff --git a/vendor/cmder.sh b/vendor/cmder.sh index 8467593b3..e9eb2f7d3 100644 --- a/vendor/cmder.sh +++ b/vendor/cmder.sh @@ -33,12 +33,12 @@ CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::') export CMDER_ROOT -if [ -f "/c/Program Files/Git/cmd/git.exe" ] ; then +if [ -f "${CMDER_ROOT}/vendor/git-for-windows/cmd/git.exe" ] ; then + GIT_INSTALL_ROOT=${CMDER_ROOT}/vendor/git-for-windows +elif [ -f "/c/Program Files/Git/cmd/git.exe" ] ; then GIT_INSTALL_ROOT="/c/Program Files/Git" elif [ -f "/c/Program Files(x86)/Git/cmd/git.exe" ] ; then GIT_INSTALL_ROOT="/c/Program Files(x86)/Git" -elif [ -f "${CMDER_ROOT}/vendor/git-for-windows/cmd/git.exe" ] ; then - GIT_INSTALL_ROOT=${CMDER_ROOT}/vendor/git-for-windows fi if [[ ! "$PATH" =~ "${GIT_INSTALL_ROOT}/bin:" ]] ; then diff --git a/vendor/cmder_exinit b/vendor/cmder_exinit index 4ec3351af..1dfbfc42c 100644 --- a/vendor/cmder_exinit +++ b/vendor/cmder_exinit @@ -1,4 +1,6 @@ -# Copy this file to your non integrated *nix-like environment, +#!/usr/bin/env bash + +## Copy this file to your non integrated *nix-like environment, # Cygwin/MSys2/Git for Windows SDK, installs '/etc/profile.d/' # folder to integrate the externally installed Unix like environment # into Cmder so it has access to settings stored in Cmder/config @@ -34,7 +36,6 @@ function runProfiled { if [ ! "x${profile_d_scripts}" = "x" ] ; then for x in ${profile_d_scripts} ; do - echo Sourcing "${1}/${x}"... . "${1}/${x}" done fi @@ -46,10 +47,8 @@ function runProfiled { # We do this for bash as admin sessions since $CMDER_ROOT is not being set if [ "$CMDER_ROOT" = "" -a "$ConEmuDir" != "" ] ; then - if [ -d "${ConEmuDir}../../vendor" ] ; then + if [ -d "${ConEmuDir}/../../vendor" ] ; then case "$ConEmuDir" in *\\*) CMDER_ROOT=$( cd "$(cygpath -u "$ConEmuDir")/../.." ; pwd );; esac - else - echo "Running in ConEmu without Cmder, skipping Cmder integration." fi elif [ "$CMDER_ROOT" != "" ] ; then case "$CMDER_ROOT" in *\\*) CMDER_ROOT="$(cygpath -u "$CMDER_ROOT")";; esac @@ -59,8 +58,6 @@ if [ ! "$CMDER_ROOT" = "" ] ; then # Remove any trailing '/' CMDER_ROOT=$(echo $CMDER_ROOT | sed 's:/*$::') - echo "Using \"CMDER_ROOT\" at \"${CMDER_ROOT}\"." - export CMDER_ROOT PATH=${CMDER_ROOT}/bin:${CMDER_ROOT}/vendor/bin:$PATH:${CMDER_ROOT} diff --git a/vendor/git-prompt.sh b/vendor/git-prompt.sh index a02af6224..189e3dc6a 100644 --- a/vendor/git-prompt.sh +++ b/vendor/git-prompt.sh @@ -38,7 +38,7 @@ then . ~/.config/git/git-prompt.sh fi else - PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]' # set window title + PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title # PS1="$PS1"'\n' # new line PS1="$PS1"'\[\033[32m\]' # change to green PS1="$PS1"'\u@\h ' # user@host @@ -71,4 +71,15 @@ else PS1="$PS1"'λ ' # prompt: always λ fi -MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc \ No newline at end of file +MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc + +# Evaluate all user-specific Bash completion scripts (if any) +if test -z "$WINELOADERNOEXEC" +then + for c in "$HOME"/bash_completion.d/*.bash + do + # Handle absence of any scripts (or the folder) gracefully + test ! -f "$c" || + . "$c" + done +fi diff --git a/vendor/start_git_bash.cmd b/vendor/start_git_bash.cmd new file mode 100644 index 000000000..136feabc4 --- /dev/null +++ b/vendor/start_git_bash.cmd @@ -0,0 +1,47 @@ +@echo off + +if not defined CMDER_ROOT ( + if defined ConEmuDir ( + for /f "delims=" %%i in ("%ConEmuDir%\..\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) else ( + for /f "delims=" %%i in ("%~dp0\..") do ( + set "CMDER_ROOT=%%~fi" + ) + ) +) + +if defined ConEmuDir ( + set "gitCommand=--command=%ConEmuBaseDirShort%\conemu-msys2-64.exe" +) + +if exist "%CMDER_ROOT%\vendor\git-for-windows" ( + set "PATH=%CMDER_ROOT%\vendor\git-for-windows\usr\bin;%PATH%" + set "gitCmd=%CMDER_ROOT%\vendor\git-for-windows\git-cmd.exe" + set "bashCmd=%CMDER_ROOT%\vendor\git-for-windows\usr\bin\bash.exe" +) else if exist "%ProgramFiles%\git" ( + set "PATH=%ProgramFiles%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles%\git\git-cmd.exe" + set "bashCmd=%ProgramFiles%\git\usr\bin\bash.exe" + if not exist "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) else if exist "%ProgramFiles(x86)%\git" ( + set "PATH=%ProgramFiles(x86)%\git\usr\bin;%PATH%" + set "gitCmd=%ProgramFiles(x86)%\git\git-cmd.exe" + set "bashCmd=%ProgramFiles(x86)%\git\usr\bin\bash.exe" + if not exist "%ProgramFiles(x86)%\git\etc\profile.d\cmder_exinit.sh" ( + echo Run 'mklink "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh" "%CMDER_ROOT%\vendor\cmder_exinit"' in 'cmd::Cmder as Admin' to use Cmder with external Git Bash + echo. + echo or + echo. + echo Run 'echo "" ^> "%ProgramFiles^(x86^)%\git\etc\profile.d\cmder_exinit.sh"' in 'cmd::Cmder as Admin' to disable this message. + ) +) + +"%gitCmd%" --no-cd %gitCommand% "%bashCmd%" --login -i