Commit Graph

210 Commits

Author SHA1 Message Date
Dax T. Games
377d97e56a fix path with ! in dir 2019-10-13 10:07:23 -04:00
Matt Covalt
b310a2c47c
Disable clink logging 2019-08-29 12:48:52 -04:00
Dax T Games
ea531cdd44 Fix post-install.bat not running and deleting itself (#2106)
* Fix post-install.bat not running

* Changelog

* Changelog
2019-06-03 11:23:00 +01:00
Dax T. Games
345562dbd0 Merge branch 'ps1_prompt' of https://github.com/daxgames/cmder into ps1_prompt 2019-03-31 16:48:10 -04:00
Dax T. Games
b424012a08 make debug messages more verbose 2019-03-31 09:48:58 -04:00
Dax T Games
a93fff6798
Update init.bat 2019-03-17 15:09:02 -04:00
Dax T. Games
2582891307 Merge branch 'master' of https://github.com/cmderdev/cmder 2019-03-01 19:54:14 -05:00
Dax T. Games
16bf572cdf Merge branch 'master' of github.com:cmderdev/cmder into git_clink_changes 2019-02-28 18:03:58 -05:00
Dax T. Games
cc12b848ac provide default settings for clink that updates the history file in real time 2019-02-28 17:44:28 -05:00
Dax T. Games
760f4e579e ignore all /d arg if running inside vscode 2019-01-06 18:09:06 -05:00
Dax T. Games
6d8f7a290a ignore all args if running inside vscode 2019-01-06 17:46:50 -05:00
Dax T. Games
2a4e9d8301 workaround vscode tasks showing cmder debug output 2019-01-06 17:27:04 -05:00
Dax T Games
f4389fc552
Merge pull request #1988 from daxgames/no_prefer_nix_option_
Prefer /nix_tools option
2018-12-16 13:08:56 -05:00
Dax T Games
8101923242
Merge pull request #1987 from seeq12/default-files-user-profile
Use default files for default user profiles
2018-12-16 10:31:48 -05:00
Dax T Games
0f30329e38
Update init.bat 2018-12-13 21:55:08 -05:00
Dax T. Games
528a69dab9 update nix_tools option to allow preferring nix tools 2018-12-13 20:54:18 -05:00
Cody Ray Hoeft
0c9e0e2f8c Use default files for default user profiles 2018-12-13 12:13:17 -08:00
Patrick Stewart
20eb7b8e81 Add /nix_tools switch to init.bat to optionally add !GIT_INSTALL_ROOT!\usr\bin to PATH 2018-12-13 16:09:52 +00:00
Dax T. Games
8ac540ebb6 debug 2018-12-02 11:51:00 -05:00
Dax T. Games
dc492c836f Merge branch 'master' of https://github.com/cmderdev/cmder into prefer_nix_option 2018-12-02 11:46:01 -05:00
Dax T. Games
1eb03dd1b8 add '/prefer_nix' switch to init.bat 2018-12-02 11:44:18 -05:00
Van der Boon, Robert GSNL-PTT/SPD
572a94ca3a Improve LANG env var detection 2018-11-30 12:01:21 +01:00
Dax T. Games
eb6a332da2 Merge branch 'master' of https://github.com/cmderdev/cmder into multi-user 2018-11-22 16:21:24 -06:00
Daniel Chesters
036cf09360
Ensure use the system find and findstr command instead find/findstr from path. Fix #1959 2018-11-22 21:14:02 +01:00
Dax T. Games
0efeaa91fa cleanup 2018-11-11 08:04:35 -05:00
Dax T. Games
e904ebce72 use user_conemu.xml or conemu-%computername%.xml directly if '-c [path]' is used to start cmder. 2018-11-10 17:26:08 -05:00
Dax T. Games
d04cc1f04e fix timer error 2018-11-10 13:57:26 -05:00
Dax T Games
a5bdecca77 Add /f for fast init. (#1942)
The below enables Cmder Fast Init mode for `cmd.exe` sessions.  This is more like the Cmder 1.3.5 init process.  See issue #1821 

Cmder Fast Init mode bypasses or disables the following Cmder 1.3.6+ features:

* Git root and version detection.  Defaults to `%cmder_root%\vendor\git-for-windows` if it exists.
* Path enhance validation before path modify so `%Path%` enhancements are forced.
* Recursive path add for `"%CMDER_ROOT%\bin"`
* Recursive path add for `"%CMDER_USER_BIN%\bin"` if `/c [user_config_folder` is specified.
* `/d` switch to enable debug output.
* `/v` switch to enable debug output.

Add `/f` to Cmder task as shown below t enable fast init:

_Note 1: This setting is invalid in Cmder `Powershell` and `Bash` sessions~_

_Note 2: Add `/t` also to see init timer output_

![image](https://user-images.githubusercontent.com/7318053/47957637-052e3880-df90-11e8-93ef-91e1ab696d82.png)

Cuts ~2.4 seconds off of init time.

![image](https://user-images.githubusercontent.com/7318053/47957795-45db8100-df93-11e8-8ae0-551d12c4e2dc.png)
2018-11-04 01:36:51 +01:00
Gregory Lucas
5be25f29f8 Initialize time_init to fix init error message 2018-11-03 18:52:26 +01:00
Dax T Games
3a11d45552 add diag helper scripts and adds to the path (#1918)
These scripts are to help us help our users by getting a relative picture of their environment that they can submit with an incident.
2018-11-02 14:00:40 +01:00
Nicolas Arnaud-Cormos
a607f0f2d5 Ensure the right git path is found in case of shim.
If the git found is a shim, we need to follow the path to the actual git
directory to set the GIT_INSTALL_ROOT variable.
This happens when installing git via scoop for example.
2018-10-10 07:14:50 +02:00
Benjamin Staneck
66da1716bc
Merge pull request #1758 from xiazeyu/master
lib to check init.bat's custom args
2018-09-30 18:06:42 +02:00
Benjamin Staneck
c3956e307a
Merge pull request #1889 from leochien0102/leochien0102-patch-1
Leochien0102 Fix the 'was unexpected at this time.' at start
2018-09-29 23:15:26 +02:00
leochien0102
8dc9bc9ae1
fix the 'was unexpected at this time.'
Change the single quotation marks to double while path concerned
2018-09-21 16:01:52 +08:00
gaoslin
bb4ed4af51
Update init.bat 2018-09-18 17:26:11 +08:00
Dax T. Games
bda09bc274 init.bat update for cexec 2018-09-16 16:23:22 -05:00
Dax T. Games
8cf59d1cbf cleanup 2018-09-16 10:21:37 -05:00
Dax T. Games
1d36ba4ed4 fix user lua and git detection 2018-09-16 10:18:10 -05:00
Dax T. Games
9dce9d0f62 added exit codes 2018-09-15 13:55:54 -05:00
Retomehere
0730c6e32b
Merge branch 'master' into master 2018-09-15 11:28:04 +08:00
Dax T. Games
bd9cff2691 cleanup 2018-09-05 18:07:27 -05:00
Dax T. Games
7b191d3caf cleanup 2018-09-03 14:54:52 -05:00
Dax T. Games
277972a7f2 fixed 2018-09-03 12:59:43 -04:00
Dax T. Games
ec4c815264 cleanup 2018-09-03 06:08:44 -05:00
Dax T. Games
d58c6c2070 cleanup 2018-09-02 19:17:16 -05:00
Dax T. Games
9869f9a372 cleanup 2018-09-02 18:59:14 -05:00
Dax T. Games
3f96336610 verbos output 2018-09-02 18:53:49 -05:00
Dax T. Games
823eeaf082 cmder_shell settings 2018-09-02 18:18:59 -05:00
Dax T. Games
823e6fee6e add cmder_shell method 2018-09-02 17:32:20 -05:00
Dax T. Games
352a16f84d trying to get tcc working 2018-09-02 09:04:46 -05:00
Dax T. Games
541fc16daf Trying to get tcc working 2018-09-01 22:08:00 -05:00
Dax T. Games
7d40ea4609 modify message 2018-09-01 18:32:21 -04:00
Dax T. Games
451fb46ce1 move user-aliases.cmd to user_aliases.cmd 2018-09-01 18:17:09 -04:00
Dax T. Games
c25ff75187 move bin\alias.bat to vendor\bin\alias.cmd 2018-09-01 17:39:24 -04:00
Benjamin Staneck
08550751da
Merge pull request #1860 from gucong3000/lang
Add %LANG% support
2018-09-01 00:32:02 +02:00
Dax T Games
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
Benjamin Staneck
e4fb0d694b Revert "replace user-aliases with user_aliases"
This reverts commit d91438de47.
2018-08-31 18:41:06 +02:00
Benjamin Staneck
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
xiazeyu
39f47870a3
chore: unite slash 2018-08-06 16:05:31 +08:00
Retomehere
192056e19b
Merge branch 'master' into master 2018-08-06 13:14:45 +08:00
xiazeyu
f6c2d9c31e
refactor: reduce global varible useage, fixed quote issue, added parameters support 2018-08-06 13:09:59 +08:00
Dax T. Games
19d5a87224 Fix GIT_INSTALL_ROOT again 2018-05-30 01:04:41 +02:00
xiazeyu_2011
861f99d64b
rename /bin/have.bat to /vendor/lib/flag_exists.cmd
Please use %flag_exists% instead of using have
2018-05-27 10:22:44 +08:00
Retomehere
0c39d0a799
Merge branch 'master' into master 2018-05-18 20:37:19 +08:00
xiazeyu_2011
bf6dae4a24
feat: add have.bat as a wrapper 2018-05-18 20:32:05 +08:00
xiazeyu_2011
daa94c5462
Optimize comments of using arguments in user-profile.cmd 2018-05-04 20:14:40 +08:00
Dax T Games
9a3a8f23d0
Little Changes 2018-05-01 08:57:02 -04:00
xiazeyu_2011
99f51b0fc0 fix conflict with init.bat build-in command parser, update user-profile.cmd 2018-05-01 13:02:21 +08:00
xiazeyu_2011
a06d4e93ec Pass arguments to user-profile.cmd 2018-04-30 20:31:01 +08:00
Dax T Games
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
Dax T. Games
bc72f20a2d reposition echo 2018-04-12 21:06:00 -04:00
Dax T. Games
65bf25f1d0 fix bash and powershell init scripts 2018-04-03 14:17:34 -04:00
Dax T Games
471369f73b Made all sub-routines in init.bat importable libs (#1706) 2018-03-23 15:20:07 +01:00
Dax T Games
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
David Refoua
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
David Driscoll
badb027c24 use /dir Switch instead of CMDER_START 2018-01-09 14:50:46 +01:00
Martin Kemp
ee4f85de85
Merge pull request #1416 from gucong3000/patch-1
Compatible with Visual Studio Code (cmd)
2017-11-29 13:43:13 +01:00
Tony Lin
9d6e5c12a2 Fix startup folder issue 2017-11-13 19:33:03 +01:00
Dax T Games
3ea6d51ba4 Update init.bat 2017-08-27 14:04:24 -05:00
Hugo-KTM
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
Alpha
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
Florian Anderiasch
ba99f5b66a Fix typo in init.bat 2016-11-10 18:04:37 +01:00
Jan Schulz
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
Dax T. Games
c49c27fb88 allow setting verbose-output variable outside init.bat 2016-05-07 18:10:44 -05:00
Dax T. Games
e212ee36a2 Added :verbose-output subroutine, made aliases update more functional 2016-05-07 14:32:33 -05:00
Dax T. Games
537c658eb4 fixed git not working in cmder cmd session and added some comments 2016-05-07 10:56:08 -05:00
Jan Schulz
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
Jan Schulz
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
Jan Schulz
6c6268e968 Remove @ in new code, echo off is enough 2016-04-08 16:55:49 +02:00
Jan Schulz
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
Jan Schulz
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
Jan Schulz
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
Dax T. Games
86dd077b9d fixed - not running user-aliases.cmd if aliases variable is overridden in profile.d 2016-03-21 14:35:48 -05:00
Dax T. Games
b86f3fbaff synced with upstream/development 2016-03-20 08:30:20 -05:00
Dax T. Games
01667a5bf0 Process profile.d scripts before adding user aliases 2016-03-07 08:12:50 -06:00
Dax T. Games
3085fca9e0 synced with upstream/development 2016-03-06 17:27:27 -06:00
Dax T. Games
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
Dax T. Games
d6eec2f3a5 silence profile.d if profile.d is empty 2016-03-02 17:37:28 -06:00