## Rename user-profile.* user_profile.* to resolve#1806, #1675
* This is a backward compatible fix and will automatically and silently rename users '%cmder_root%/config/user-profile.\*' to '%cmder_root%/config/user_profile.\*' and '[user_specified_config_root]/user-profile.\*' to '[user_specified_config_root]/user_profile.\*' if the sources exist.
* Cmder.exe does this for cmd.exe sessions.
* The init scripts for bash and Powershell handles it for these shells
@MartiUK: Squashing to avoid adding multiple "fixed" commits
* add args to init.bat
* adding args to cmder launcher
* reworked command line parsing and added a /C [path] arg for individual user config location
* removed unnecessary includes
* make shell init scripts work with CMDER_USER_CONFIG
* update tasks and readme.md
* fix git version check
* readme updates
* add register/unregister back in
* fixed git version again
* removed error if user defines user-aliases store file was not present an init.bat launch
* added enhance_path method to only update path if required
* added enhance_path method to only update path if required
* fixed a path prepend issue in enhance path
* init.bat with args is executed outside cmder/conemu sets cmder_root properly. Thanks @DRSDavidSoft
* fixed enhance path append issue
* implements recursive `/bin` path enhancing.
https://github.com/cmderdev/cmder/issues/1624
* added max depth
* changes command line arg to max_depth
* set max_depth default
* readme.md updates
* add back cmder /c [path] arg so it can be used with admin sessions since the env is not shared.
* readme.md updates
* fix /c setting of cmder_user_config
* changelog and readme
* remove bad arg
* fixed command line parsing and updated command line help on error
* Fixed ConEmu.xml file handling so it works again
* Added default user config root location if '/c' is specified and next arg is not another arg
* Replaced the git version comparison mechanism with actual version comparing
* Add notes regarding the git comparison method
Added a simple mechanism to call and compare the user installed git version against the vendored git version, rather than checking if the `git.exe` executable is located in a `/bin` directory.
This fixes false warnings by actually testing if the user installed git is older, or more recent.
Added a small note regarding how the `init.bat` works, and where to put custom `git.exe` binaries as well as where to find the Minified Cmder.
* Fix Cmder not changing to CMDER_START
Fix to allow Cmder to change to different startup directory if already on the same drive as CMDER_START
possibly relevant: HOME != USERPROFILE
* make "Cmder Here" work in more cases
integrated suggestion from comments (test for trailing backslash to prevent doubling of trailing backslash)
integrated suggestions from #1456: switching ```cd /d``` over to ```pushd``` to get support for UNC-paths
* replaced 'cd /d' with 'pushd'
replaced two more instances of 'cd /d' with 'pushd' to support network paths.
Also added double quotes to the use of '%USERPROFILE%' to prevent issues with spaces.
I also noticed that 'pushd', in contrast to 'cd /d' does not require the trailing backslash for drive roots (on Win7). Therefore I removed the trailing backslash check.
* Don't assume / is needed at end
* Update init.bat
(and some comments on the user-profile.cmd file)
Inspired by the comments from https://github.com/cmderdev/cmder/issues/193 and my personal need to use pageant instead of OpenSSH authentication agents (which is more Window user-friendly), I have used this approach which works as expected.
Keeping the spirit of the current scripts, I left it disabled, and with some comments explaining what they all do.
This keeps the PROMPT variable as is and changes the prompt to the cmder style
in the clink code.
This has two advantages:
* opening a cmd in a cmder session will now show the old prompt code instead of
a ugly raw prompt without the replacements. This led to ugly output when a
batch file echoed their content (e.g `conda build recipe/`).
* when a command rewrites the prompt (e.g. an activate in a virtualenv), these
command sometimes simply overwrites the PROMPT so that the cmder enhancements
were not anymore in place. Now we simply don't care and overwrite it with our
stuff in the clink part. This might mean that a user has to install a lua
script so that e.g. conda environments are visible on the prompt.
There were problems when a path contained a parenthesis like `C:\temp\test (test)\`
As a precaution, quote all variables when they are used in echo or set.
The idea is:
* if the users points as to a specific git, use that
* test if a git is in path and if yes, use that
* last, use our vendored git
We don't make any attempt to guess a different location, if a user wants their
own git install, they have to choose "add git to path".
Also check that we have a recent enough version of git (e.g. test for
<GIT>\cmd\git.exe)
4bfdf04d59 moved all clink config files
to vendor/ and therefore the files in config/ were not used and .history
was also moved to vendor/.
The new arrangement uses `--script` to load our own clink.lua file which in
turn as the first thing loads the original clink.lua file. The user defined
files are again in config/. As clink regenerates these files, if they are not
present, this also means that we don't need to include the settings file
in the git repo and therefore don't overwrite it on updates.
The new system works by setting "CMDER_START" if a cmder.exe gets a
startup path. The rest is then implemented in the profile.ps1 and init.bat.
The new system works as follows:
1.If a startup path is given, cmder.exe sets this as `CMDER_START` and the
startup scripts change to that directory.
2.If the usere sets a `CMDER_START` environment variable and this is not
overwritten by cmder.exe, this variable is taken as the startup
directory by the startup scripts.
3.If not such path is give, the conemu startup dirs is the winner, as the
startup scripts don't change anything.