Commit Graph

104 Commits

Author SHA1 Message Date
3f96336610 verbos output 2018-09-02 18:53:49 -05:00
823eeaf082 cmder_shell settings 2018-09-02 18:18:59 -05:00
823e6fee6e add cmder_shell method 2018-09-02 17:32:20 -05:00
352a16f84d trying to get tcc working 2018-09-02 09:04:46 -05:00
541fc16daf Trying to get tcc working 2018-09-01 22:08:00 -05:00
7d40ea4609 modify message 2018-09-01 18:32:21 -04:00
451fb46ce1 move user-aliases.cmd to user_aliases.cmd 2018-09-01 18:17:09 -04:00
c25ff75187 move bin\alias.bat to vendor\bin\alias.cmd 2018-09-01 17:39:24 -04:00
08550751da Merge pull request #1860 from gucong3000/lang
Add %LANG% support
2018-09-01 00:32:02 +02:00
49da3745bc Fix #1806 #1675 (#1870)
## 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
2018-09-01 00:02:56 +02:00
e4fb0d694b Revert "replace user-aliases with user_aliases"
This reverts commit d91438de47.
2018-08-31 18:41:06 +02:00
d91438de47 replace user-aliases with user_aliases 2018-08-30 15:22:33 +02:00
b901a4a569 add LANG support 2018-08-23 11:57:16 +08:00
19d5a87224 Fix GIT_INSTALL_ROOT again 2018-05-30 01:04:41 +02:00
13ea026dc9 Fix git install root
This is untested so don't merge yet.  I'll test tonight.
2018-04-26 19:06:18 -04:00
bc72f20a2d reposition echo 2018-04-12 21:06:00 -04:00
65bf25f1d0 fix bash and powershell init scripts 2018-04-03 14:17:34 -04:00
471369f73b Made all sub-routines in init.bat importable libs (#1706) 2018-03-23 15:20:07 +01:00
997e799138 New cmder.exe args and shared install capability (#1696)
@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
2018-03-13 16:38:27 +01:00
8237b1010c Detect and compare installed Git version against vendored Git (#1658)
* 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.
2018-02-22 19:20:08 +00:00
badb027c24 use /dir Switch instead of CMDER_START 2018-01-09 14:50:46 +01:00
ee4f85de85 Merge pull request #1416 from gucong3000/patch-1
Compatible with Visual Studio Code (cmd)
2017-11-29 13:43:13 +01:00
9d6e5c12a2 Fix startup folder issue 2017-11-13 19:33:03 +01:00
3ea6d51ba4 Update init.bat 2017-08-27 14:04:24 -05:00
22d27afed5 Fix Cmder not changing to CMDER_START (#1399)
* 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
2017-08-27 19:46:47 +02:00
1f9e743ef2 Added pagent ssh auth support (#1391)
(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.
2017-07-24 23:16:10 +02:00
25005930ba Compatible with Visual Studio Code 2017-06-23 17:48:03 +08:00
ba99f5b66a Fix typo in init.bat 2016-11-10 18:04:37 +01:00
a542f4e20c cmd: change the prompt in lua
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.
2016-06-21 13:33:49 +02:00
c49c27fb88 allow setting verbose-output variable outside init.bat 2016-05-07 18:10:44 -05:00
e212ee36a2 Added :verbose-output subroutine, made aliases update more functional 2016-05-07 14:32:33 -05:00
537c658eb4 fixed git not working in cmder cmd session and added some comments 2016-05-07 10:56:08 -05:00
055a974257 More variable quoting in init.bat
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.
2016-05-06 15:12:07 +02:00
1bf5503bea Add quotes around all variables
This should prevent errors like
https://github.com/cmderdev/cmder/issues/935
https://github.com/cmderdev/cmder/issues/937

I've no idea why this happens, but it shouldn't hurt anyway...
2016-05-05 22:40:33 +02:00
6c6268e968 Remove @ in new code, echo off is enough 2016-04-08 16:55:49 +02:00
fbccc6b790 init.bat: remove GIT\bin from path
The only reason was bash but bash.exe is also in <GIT>\usr\bin.
2016-04-08 16:53:38 +02:00
2ccc06e639 init.bat: integrate the unix commands at the end of PATH
Some unix commands shadow windows commands and therefor the unix commands should
be at the end of the PATH
2016-04-08 16:53:38 +02:00
182629d59a init.bat: check for git in path
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)
2016-04-08 16:51:53 +02:00
86dd077b9d fixed - not running user-aliases.cmd if aliases variable is overridden in profile.d 2016-03-21 14:35:48 -05:00
b86f3fbaff synced with upstream/development 2016-03-20 08:30:20 -05:00
01667a5bf0 Process profile.d scripts before adding user aliases 2016-03-07 08:12:50 -06:00
3085fca9e0 synced with upstream/development 2016-03-06 17:27:27 -06:00
0f4292aa08 Prefer use of first line @echo off vs. @ per line to turn off echo per line. - Cleaner file, no side efects 2016-03-06 15:40:06 -06:00
d6eec2f3a5 silence profile.d if profile.d is empty 2016-03-02 17:37:28 -06:00
32c1d4028a added fully qualified path to cmd profile.d section 2016-03-02 15:17:43 -06:00
997bd5c24e Enhanced alias.bat to allow file storage path 2016-03-01 21:08:08 -06:00
8a5c58e626 fixed cmd profile.d support 2016-03-01 20:35:55 -06:00
0a6b79b9ed Added profile.d like support for all supported shells 2016-02-25 08:01:16 -06:00
788b5262b4 Reorganize how clink settings are loaded
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.
2016-01-15 18:02:10 +01:00
2c0c6ed416 Make "cmder here" work again
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.
2016-01-11 22:19:10 +01:00