mirror of
https://github.com/cmderdev/cmder.git
synced 2025-07-17 04:59:09 +08:00
Compare commits
428 Commits
v1.1.4-xpl
...
v1.3.0-pre
Author | SHA1 | Date | |
---|---|---|---|
68743a8742 | |||
73f9400aa8 | |||
3ca847fc42 | |||
0de643be42 | |||
05c113efee | |||
7d2197086e | |||
964f18c66c | |||
01667a5bf0 | |||
06c6e5fdb6 | |||
0f4292aa08 | |||
72876f41e2 | |||
722f8b7745 | |||
df768f3c5e | |||
8dbbb902d9 | |||
d6eec2f3a5 | |||
32c1d4028a | |||
c904676cf4 | |||
a74fdd2b68 | |||
8a5c58e626 | |||
bf75f70181 | |||
8fa151d1db | |||
33d6f11e87 | |||
434d6f2996 | |||
59e4a1684b | |||
361a8eae66 | |||
727d6a6abd | |||
f7a18d4b6e | |||
9e7f860e2d | |||
6cf62dcdc7 | |||
79f8560a24 | |||
4245608e6d | |||
aedd078050 | |||
a959409c0f | |||
0a6b79b9ed | |||
85ce629dde | |||
78ea063fb0 | |||
a99d27a7e1 | |||
289126f870 | |||
e1eed7a0f1 | |||
c3042909e0 | |||
64d981e470 | |||
3fab0c122c | |||
9ace64f6dc | |||
95bbb8edbb | |||
842394300f | |||
26e6d80364 | |||
728e83a85b | |||
95f6096a45 | |||
fab895bd9b | |||
b17db6930a | |||
d97bc4ca69 | |||
914ddb8207 | |||
7962edac56 | |||
97cae2bdc7 | |||
6bb07d9b19 | |||
fccba9269d | |||
07b426355e | |||
261b8bfce3 | |||
c055ce1c13 | |||
fe45b186e0 | |||
788b5262b4 | |||
73e1eb2a8b | |||
fabcd468a7 | |||
df7a662965 | |||
e7243efce2 | |||
9c7a037948 | |||
4dc1249881 | |||
5b7c008202 | |||
724b9a25da | |||
2c0c6ed416 | |||
c77641cf03 | |||
378014d5d4 | |||
1389fe0c4d | |||
9eb9620966 | |||
add52c0ee6 | |||
744522b97b | |||
6879a94c10 | |||
41836e669b | |||
4a4e48e04c | |||
5f68e4e987 | |||
bdd0f38d59 | |||
6280416aed | |||
567889e69f | |||
9a1d49bfc3 | |||
30dbfa6144 | |||
73f5cbdc7b | |||
d0909f27e1 | |||
b88ea50aef | |||
46bad57ef8 | |||
3595d3e7fc | |||
05c6f1c9cc | |||
182d0c15a3 | |||
867910ac9e | |||
630ac0c571 | |||
105e381e66 | |||
854cadb185 | |||
4bfdf04d59 | |||
c9550490f5 | |||
85804d729e | |||
4154cdf204 | |||
76e14cd268 | |||
8601b0f940 | |||
ce2a311c81 | |||
191316282a | |||
fd9c8a74b1 | |||
519b9cabbb | |||
9b25544c05 | |||
a9b06459da | |||
5eff672a4b | |||
8566b6f6ca | |||
1af65edaec | |||
e6d2394d48 | |||
6d215f58c6 | |||
7e4912514f | |||
86edf3cbb0 | |||
a3e2d7546d | |||
b9362b0a3d | |||
1046198648 | |||
908773622d | |||
deb23a21a1 | |||
1ec507c1d0 | |||
1b159df7c2 | |||
2e582b9db9 | |||
f9b2c768b8 | |||
4ce55d1019 | |||
7f43014b68 | |||
cf15dcffc7 | |||
10d0431242 | |||
eb5ab51573 | |||
87bc4178e6 | |||
85aaa09d97 | |||
3a2d986c36 | |||
37626e7687 | |||
b018f2cc50 | |||
ffd61db30e | |||
53e03076da | |||
6e3b83460c | |||
3657795b35 | |||
df37981707 | |||
669bc8bfa6 | |||
c2823af661 | |||
66a75ce0dc | |||
15013369cb | |||
50c5742794 | |||
a57c11e171 | |||
417051f496 | |||
0f6441a7ee | |||
5e07567a72 | |||
0f68e48a7b | |||
46fed27096 | |||
80bafd165f | |||
1d47a98329 | |||
07180effac | |||
1e61b858c3 | |||
7ebfffc9da | |||
719d598048 | |||
5e56fbcf38 | |||
5a1aa7e25b | |||
215ba574aa | |||
45cdfc33f2 | |||
0ab9b74013 | |||
f71a1f3903 | |||
fedcee011d | |||
1526bb631f | |||
27240995f4 | |||
b8f7bde353 | |||
0051614e4b | |||
d6b54eec24 | |||
052ab118e2 | |||
c46eb6a525 | |||
48259b87ac | |||
2a26026749 | |||
d68816bd11 | |||
419c785db5 | |||
c15e3f4ebd | |||
1f75f85b7c | |||
4203a8a4ea | |||
cf8a992e37 | |||
cec7fa3398 | |||
83c685cdc7 | |||
24fd027cda | |||
df259195ab | |||
20b8b09419 | |||
7bc71010c2 | |||
e5eadc766f | |||
f638e93c21 | |||
6608e16c3b | |||
d979140bb5 | |||
568e2cfcdd | |||
a9ee246241 | |||
d4ee65405d | |||
3c1aa08313 | |||
36291ab789 | |||
73c8c0c233 | |||
61a9b83c42 | |||
5bcddd6b44 | |||
32cd7dcb58 | |||
b40b0067c0 | |||
4edec1675a | |||
4ed35fe110 | |||
583109b695 | |||
f783cd8add | |||
6952d602d2 | |||
eec3fd5578 | |||
7c907a5174 | |||
30f7847852 | |||
801a4ac901 | |||
143e659187 | |||
7fd43b939b | |||
5ce077a74a | |||
fc85915b2c | |||
63d35a9760 | |||
373a58e1e6 | |||
3e06fcbf07 | |||
ea1edda966 | |||
2857e4d6bc | |||
ecbf7a01d1 | |||
dc9263a11c | |||
8659b9c6ed | |||
316a42b8f9 | |||
676297c0d4 | |||
3aff065210 | |||
f6a0447a9a | |||
70b0615b34 | |||
2a1a736ceb | |||
40fd96b135 | |||
271b3ea876 | |||
c4873c6e58 | |||
29d1378d7a | |||
c15e29ecb3 | |||
c38f6b3a89 | |||
99ea376713 | |||
2051078cc6 | |||
6c5034164c | |||
4651201b6c | |||
3966ed9433 | |||
2383777418 | |||
a18320c938 | |||
83a853bd52 | |||
53efab127e | |||
4de72b68dd | |||
f196375f53 | |||
696a0d7622 | |||
7217d5c536 | |||
e549f88b00 | |||
687fb72397 | |||
a5968d3d49 | |||
aaf70a4d9f | |||
717b9f990e | |||
4f0e51c6a8 | |||
520e7cfc0d | |||
84dc9c5f0c | |||
c466698d6b | |||
18fc5e37c7 | |||
2292348f95 | |||
2855a699a1 | |||
d8c9d32cb2 | |||
522a75835f | |||
b75b3239e7 | |||
69eb956d65 | |||
6c074693a4 | |||
dfa58acccc | |||
e811c60ab2 | |||
004761b32f | |||
8b8f98c078 | |||
58a89e779b | |||
aad729eb87 | |||
2c184f8721 | |||
3c289b455b | |||
66d5170514 | |||
b25e46d7a7 | |||
60d3c67194 | |||
34947c4f0f | |||
3b637e9866 | |||
efe244b5fa | |||
aa9cb38672 | |||
7169f49fff | |||
021263d81c | |||
5dbb84d78b | |||
1cea2c3278 | |||
187156487e | |||
c0dcce4880 | |||
4b2590bfd3 | |||
df4e83de43 | |||
4a681bbc60 | |||
1ae1194555 | |||
e566589871 | |||
a0d87e8368 | |||
31c169a761 | |||
af30a90ef0 | |||
8a885167c3 | |||
0311e129ca | |||
8275f005b2 | |||
b216079966 | |||
c3d1ccba79 | |||
7834fe0a26 | |||
64aaa96bfb | |||
a708fff824 | |||
f78e24094b | |||
d3e85417ce | |||
33810f993f | |||
ed7a20cec2 | |||
45ff72b48b | |||
f5ce49b8b3 | |||
17b4525e60 | |||
6c69536295 | |||
b831c4569f | |||
dba00b9175 | |||
01849c3365 | |||
30ddd53288 | |||
0ae09e9a4a | |||
e224d133f3 | |||
503ddcb895 | |||
11753fdd2a | |||
ad4a2103ea | |||
6106a555fe | |||
75707f9a65 | |||
dc834cc28f | |||
bbbda146b8 | |||
e5531537ad | |||
44e6184487 | |||
57ec099e0f | |||
b700016a15 | |||
469d299ae8 | |||
79fbae0854 | |||
f4bca30e11 | |||
b067d48f6c | |||
188305426f | |||
ea3863bc6b | |||
c8193ea368 | |||
25991ac6a1 | |||
717b556d7a | |||
20c9ba207d | |||
d6edd152ad | |||
6a241b5e7c | |||
373e1ef36d | |||
5b91665040 | |||
e95127268e | |||
1067ca0fc6 | |||
9c29adfe68 | |||
312fec2550 | |||
247c65ef05 | |||
45c9742ea5 | |||
5bd0c29c25 | |||
1e2f954724 | |||
f5eb662783 | |||
e363139b30 | |||
0e5f070347 | |||
98350e14e8 | |||
18fea0ac03 | |||
0f295234cc | |||
dcc9f5e59a | |||
73795739f0 | |||
67b963b7ee | |||
93589b1c8d | |||
a6f35d6373 | |||
bbcabfb730 | |||
75801cbdc8 | |||
9822fa844e | |||
a9f5d552bc | |||
63120b8998 | |||
8cdce27653 | |||
a5691285ec | |||
3223a0391a | |||
a39c632d71 | |||
8c6847ee0d | |||
f66f598fca | |||
de8d2d22f6 | |||
72c045dc2d | |||
5ee2fb2a8d | |||
2ba40773b3 | |||
662663813e | |||
2ec650557e | |||
932e517c2f | |||
6a9d6dd37e | |||
e9707b2022 | |||
ef91a9c272 | |||
9939b1ba7f | |||
c032b5f8a0 | |||
9ce90d337b | |||
2a722ee3f3 | |||
3cfd032007 | |||
21f0f1dbb2 | |||
38c13a7f4b | |||
97980f5f34 | |||
e3e1effef3 | |||
2542358965 | |||
6b37074dd5 | |||
1b7e647b4b | |||
e6618f21a3 | |||
56a9a2036f | |||
f6c3a0c390 | |||
46f6f677dc | |||
d5d8b0944b | |||
8e676b3fc7 | |||
b9379b3ae2 | |||
db49c14422 | |||
46bebee94c | |||
691000fa15 | |||
df064ec4be | |||
e1c60104ba | |||
3a8daf57f7 | |||
fa33052096 | |||
fe31accba4 | |||
3b053f8848 | |||
c76950293e | |||
ea22c658b7 | |||
303bfda521 | |||
1f8b0c009a | |||
cf74dba780 | |||
a9bfd2d2a2 | |||
b0b8eaef1e | |||
5243d8bb8d | |||
1225d410fa | |||
c661b1f300 | |||
4c1f96c51d | |||
f4b6d8f9a8 | |||
0314ee5d46 | |||
6a761a88c1 | |||
447be262f8 | |||
371ffbc069 | |||
6d0d93e0fd | |||
b4a264b1bc | |||
3bd0fe517f | |||
83cd726a41 | |||
b30056c4b3 | |||
7688823886 | |||
878499cc0b |
14
.gitignore
vendored
14
.gitignore
vendored
@ -1,9 +1,17 @@
|
|||||||
|
|
||||||
## Those files should be taken from their repositary
|
## Those files should be taken from their repositary
|
||||||
|
|
||||||
vendor/*
|
vendor/*/*
|
||||||
!vendor/*.md
|
!vendor/*
|
||||||
!vendor/*.bat
|
!vendor/psmodules/PsGet
|
||||||
|
|
||||||
config/.history
|
config/.history
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
*.exe
|
*.exe
|
||||||
|
*.dll
|
||||||
|
build/
|
||||||
|
Version v*
|
||||||
|
*.bak
|
||||||
|
config/user-*
|
||||||
|
config/aliases
|
||||||
|
config/profile.d
|
||||||
|
38
CONTRIBUTING.md
Normal file
38
CONTRIBUTING.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# How to contribute
|
||||||
|
|
||||||
|
Unfortunately we all can't work on cmder every day of the year, so I have decided to write some guidelines for contributing.
|
||||||
|
|
||||||
|
If you follow them your contribution will likely be pulled in quicker.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
* Fork the repository on GitHub (It's that easy)
|
||||||
|
* Create a feature branch based on the development branch.
|
||||||
|
|
||||||
|
## Making Changes
|
||||||
|
|
||||||
|
* Make changes in your seperate branch.
|
||||||
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||||
|
* Make sure your commit messages are easy to understand
|
||||||
|
* Squash your 'Correcting mistakes' commits if you have a lot of them. (See the 'Squashing Commits' link below)
|
||||||
|
* Make sure your changes won't affect new users or user without a customised system, try out your changes on a fresh Windows VM to see if it would affect a new user's experience.
|
||||||
|
* Sometimes a change that helps you with your cmder experience and tools doesn't always mean other people may need/want it.
|
||||||
|
|
||||||
|
## Making Trivial Changes
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
|
||||||
|
* If the documentation is about a currently available feature in cmder or correcting already created documentation, you can safely make your changes on the master branch and pull request them onto master.
|
||||||
|
|
||||||
|
## Submitting Changes
|
||||||
|
|
||||||
|
* Push your changes to the branch in your fork of the repository.
|
||||||
|
* Submit a pull request to the develop branch of the cmder repository (unless it's a change in documentation [see above]).
|
||||||
|
* Make sure you explicitly say to not complete the pull request if you are still making changes.
|
||||||
|
|
||||||
|
|
||||||
|
# Additional Resources
|
||||||
|
|
||||||
|
* [Squashing Commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)
|
||||||
|
* [General GitHub documentation](http://help.github.com/)
|
||||||
|
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
10
Cmder.bat
10
Cmder.bat
@ -1,3 +1,11 @@
|
|||||||
@echo off
|
@echo off
|
||||||
SET CMDER_ROOT=%~dp0
|
SET CMDER_ROOT=%~dp0
|
||||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml"
|
|
||||||
|
:: Remove trailing '\'
|
||||||
|
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
|
||||||
|
|
||||||
|
if exist "%~1" (
|
||||||
|
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1"
|
||||||
|
) else (
|
||||||
|
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml"
|
||||||
|
)
|
||||||
|
189
README.md
Normal file
189
README.md
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
# Cmder
|
||||||
|
|
||||||
|
[](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://conemu.github.io/) with *major* config overhaul, comes with a Monokai color scheme, amazing [clink](https://github.com/mridgers/clink) (further enhanced by [clink-completions](https://github.com/vladimir-kotikov/clink-completions)) and a custom prompt layout.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Why use it
|
||||||
|
|
||||||
|
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, which makes it great for **USB Sticks** or **cloud storage**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Download the [latest release](https://github.com/cmderdev/cmder/releases/)
|
||||||
|
2. Extract
|
||||||
|
3. (optional) Place your own executable files into the `bin` folder to be injected into your PATH.
|
||||||
|
4. Run Cmder
|
||||||
|
|
||||||
|
## Integration
|
||||||
|
|
||||||
|
So you've experimented with Cmder a little and want to give it a shot in a more permanent home;
|
||||||
|
|
||||||
|
### Shortcut to open Cmder in a chosen folder
|
||||||
|
|
||||||
|
1. Open a terminal as an Administrator
|
||||||
|
2. Navigate to the directory you have placed Cmder
|
||||||
|
3. Execute `.\cmder.exe /REGISTER ALL`
|
||||||
|
_If you get a message "Access Denied" ensure you are executing the command in an **Administrator** prompt._
|
||||||
|
|
||||||
|
In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.
|
||||||
|
|
||||||
|
## Keyboard shortcuts
|
||||||
|
|
||||||
|
### Tab manipulation
|
||||||
|
|
||||||
|
* <kbd>Ctrl</kbd> + <kbd>T</kbd> : New tab dialog (maybe you want to open cmd as admin?)
|
||||||
|
* <kbd>Ctrl</kbd> + <kbd>W</kbd> : Close tab
|
||||||
|
* <kbd>Ctrl</kbd> + <kbd>D</kbd> : Close tab (if pressed on empty command)
|
||||||
|
* <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>#Number</kbd> : Fast new tab: <kbd>1</kbd> - CMD, <kbd>2</kbd> - PowerShell
|
||||||
|
* <kbd>Alt</kbd> + <kbd>Enter</kbd>: Fullscreen
|
||||||
|
|
||||||
|
### Shell
|
||||||
|
|
||||||
|
* <kbd>Shift</kbd> + <kbd>Up</kbd> : Traverse up in directory structure (lovely feature!)
|
||||||
|
* <kbd>End</kbd>, <kbd>Home</kbd>, <kbd>Ctrl</kbd> : Traversing text with as usual on Windows
|
||||||
|
* <kbd>Ctrl</kbd> + <kbd>R</kbd> : History search
|
||||||
|
* <kbd>Shift</kbd> + Mouse : Select and copy text from buffer
|
||||||
|
|
||||||
|
(Some shortcuts are not yet documented, though they exist - please document them here)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
### Access to multiple shells in one window using tabs
|
||||||
|
You can open multiple tabs each containing one of the following shells:
|
||||||
|
|
||||||
|
|Task|Shell|Description|
|
||||||
|
|----|-----|-----------|
|
||||||
|
|Cmder|cmd.exe|Windows 'cmd.exe' shell enhanced with Git, Git aware prompt, Clink(GNU Readline), and Aliases.|
|
||||||
|
|Cmder as Admin|cmd.exe|Administrative Windows 'cmd.exe' Cmder shell.|
|
||||||
|
|Powershell|powershell.exe|Windows Powershell enhanced with Git and Git aware prompt .|
|
||||||
|
|Powershell as Admin|powershell.exe|Administrative Windows 'powerhell.exe' Cmder shell.|
|
||||||
|
|Bash|bash.exe|Unix/Linux like bash shell running on Windows.|
|
||||||
|
|Bash as Admin|bash.exe|Administrative Unix/Linux like bash shell running on Windows.|
|
||||||
|
|Mintty|bash.exe|Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences|
|
||||||
|
|Mintty as Admin|bash.exe|Administrative Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences|
|
||||||
|
|
||||||
|
Cmder, Powershell, and Bash tabs all run on top of the Windows Console API and work as you might expect in Cmder with access to use ConEmu's color schemes, key bindings and other settings defined in the ConEmu Settings dialog.
|
||||||
|
|
||||||
|
Mintty tabs use a program called 'mintty' as the terminal that is not based on the Windows Console API so some differences in functionality are normal, as a result mintty specific config is done via the '[%USERPROFILE%|$HOME]/.minttyrc' file.
|
||||||
|
|
||||||
|
Mintty differs from the other tabs in that it supports xterm/xterm-256color TERM types, and does not work with ConEmu settings like color schemes and key bindings. For more on Mintty and its config click [here](https://code.google.com/p/mintty/).
|
||||||
|
|
||||||
|
An example of setting Cmder portable terminal colors for mintty:
|
||||||
|
|
||||||
|
From a bash/mintty shell:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd $CMDER_ROOT/vendor
|
||||||
|
git clone https://github.com/karlin/mintty-colors-solarized.git
|
||||||
|
cd mintty-colors-solarized/
|
||||||
|
echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user-profile.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cmder Portable Shell User Config
|
||||||
|
User specific configuration is possible using the cmder specific shell config files. Edit the below files to add your own configuration:
|
||||||
|
|
||||||
|
|Shell|Cmder Portable User Config|
|
||||||
|
| ------------- |:-------------:|
|
||||||
|
|Cmder|%CMDER_ROOT%\config\user-profile.cmd|
|
||||||
|
|Powershell|$ENV:CMDER_ROOT\config\user-profile.ps1|
|
||||||
|
|Bash/Mintty|$CMDER_ROOT/config/user-profile.sh|
|
||||||
|
|
||||||
|
Note: Bash and Mintty sessions will also source the '$HOME/.bashrc' file it it exists after it sources '$CMDER_ROOT/config/user-profile.sh'.
|
||||||
|
|
||||||
|
### Linux like 'profile.d' support for all supported shell types.
|
||||||
|
You can write *.cmd|*.bat, *.ps1, and *.sh scripts and just drop them in the %CMDER_ROOT%\config\profile.d folder to add startup config to Cmder.
|
||||||
|
|
||||||
|
|Shell|Cmder 'Profile.d' Scripts|
|
||||||
|
| ------------- |:-------------:|
|
||||||
|
|Cmder|%CMDER_ROOT%\config\profile.d\\*.bat and *.cmd|
|
||||||
|
|Powershell|$ENV:CMDER_ROOT\config\profile.d\\*.ps1|
|
||||||
|
|Bash/Mintty|$CMDER_ROOT/config/profile.d/*.sh|
|
||||||
|
|
||||||
|
|
||||||
|
### Aliases
|
||||||
|
#### Cmder(Cmd.exe) Aliases
|
||||||
|
You can define simple aliases for `cmd.exe` sessions with a command like `alias name=command`. Cmd.exe aliases support optional parameters through the `$1-9` or the `$*` special characters so the alias `vi=vim.exe $*` typed as `vi [filename]` will open `[filename]` in `vim.exe`.
|
||||||
|
|
||||||
|
Cmd.exe aliases can also be more complex. See: [DOSKEY.EXE documentation](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/doskey.mspx?mfr=true) for additional details on complex aliases/macros for 'cmd.exe'
|
||||||
|
|
||||||
|
Aliases defined using the `alias.bat` command will automatically be saved in the `%CMDER_ROOT%\config\aliases` file
|
||||||
|
|
||||||
|
#### Bash.exe|Mintty.exe Aliases
|
||||||
|
Bash shells support simple and complex aliases with optional parameters natively so they work a little different. Typing `alias name=command` will create an alias only for the current running session. To make an alias permanent add it to either your `$CMDER_ROOT/config/user-profile.sh` or your `$HOME/.bashrc`.
|
||||||
|
|
||||||
|
If you add bash aliases to `$CMDER_ROOT/config/user-profile.sh` they will portable and follow your Cmder folder if you copy it to another machine. `$HOME/.bashrc` defined aliases are not portable.
|
||||||
|
|
||||||
|
#### Powershell.exe Aliases
|
||||||
|
Powershell has native simple alias support, for example `[new-alias | set-alias] alias command`, so complex aliases with optional parameters are not supported in Powershell sessions. Type `get-help [new-alias|set-alias] -full` for help on Powershell aliases.
|
||||||
|
|
||||||
|
### SSH Agent
|
||||||
|
|
||||||
|
To start SSH agent simply call `start-ssh-agent`, which is in the `vendor/git-for-windows/cmd` folder.
|
||||||
|
|
||||||
|
If you want to run SSH agent on startup, include the line `@call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"` in `%CMDER_ROOT%/config/user-profile.cmd` (usually just uncomment it).
|
||||||
|
|
||||||
|
### Using external Cygwin/Babun, MSys2, or Git for Windows SDK with Cmder.
|
||||||
|
|
||||||
|
1. Setup a new task by pressing '<kbd>Win</kbd> +<kbd>Alt</kbd> + <kbd>T</kbd>'
|
||||||
|
1. Click the '+' button to add a task.
|
||||||
|
1. Name the new task in the top text box.
|
||||||
|
1. Provide task parameters, this is optional.
|
||||||
|
1. Add ```cmd /c "[path_to_external_env]\bin\bash --login -i" -new_console:d:%USERPROFILE%``` to the Commands text box.
|
||||||
|
|
||||||
|
Recommended Optional Steps:
|
||||||
|
|
||||||
|
Copy the 'vendor/cmder_exinit' file to the Cygwin/Babun, MSys2, or Git for Windows SDK environments ```/etc/profile.d/``` folder to use portable settings in the $CMDER_ROOT/config folder.
|
||||||
|
|
||||||
|
Note: MinGW could work if the init scripts include profile.d but this has not been tested.
|
||||||
|
|
||||||
|
The destination file extension depends on the shell you use in that environment. For example:
|
||||||
|
|
||||||
|
* bash - Copy to /etc/profile.d/cmder_exinit.sh
|
||||||
|
* zsh - Copy to /etc/profile.d/cmder_exinit.zsh
|
||||||
|
|
||||||
|
Uncomment and edit the below line in the script to use Cmder config even when launched from outside Cmder.
|
||||||
|
|
||||||
|
```
|
||||||
|
# CMDER_ROOT=${USERPROFILE}/cmder # This is not required if launched from Cmder.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Todo
|
||||||
|
|
||||||
|
1. Check for clink and git before injecting them (Sort of done)
|
||||||
|
|
||||||
|
## Current development branch
|
||||||
|
|
||||||
|
You can download builds of the current development branch by going to Appveyor via the following link:
|
||||||
|
|
||||||
|
[](https://ci.appveyor.com/project/MartiUK/cmder/branch/development/artifacts)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
All software included is bundled with own license
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Samuel Vasko
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
81
Readme.md
81
Readme.md
@ -1,81 +0,0 @@
|
|||||||
# Cmder
|
|
||||||
|
|
||||||
Latest release is **[v1.1.3](https://github.com/bliker/cmder/releases/tag/v1.1.3)**
|
|
||||||
|
|
||||||
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://code.google.com/p/conemu-maximus5/) with *major* config overhaul. Monokai color scheme, amazing [clink](https://code.google.com/p/clink/) and custom prompt layout.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Why use it
|
|
||||||
|
|
||||||
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, that is makes it great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
1. Download the latest release
|
|
||||||
1. Extract
|
|
||||||
1. (optional) Place files into `bin` folder, it will be injected into your PATH.
|
|
||||||
1. Run cmder
|
|
||||||
|
|
||||||
*(There will be a version with installer)*
|
|
||||||
|
|
||||||
## Keyboard shortcuts
|
|
||||||
|
|
||||||
### Tab manipulation
|
|
||||||
|
|
||||||
* `Ctrl + t` : new tab dialog (maybe you want to open cmd as admin?)
|
|
||||||
* `Ctrl + w` : close tab
|
|
||||||
* `Ctrl + d` : close tab (if pressed on empty command)
|
|
||||||
* `Shift + alt + number` : fast new tab: `1` - CMD, `2` - Powershell `*` - More to come
|
|
||||||
* `Alt + enter`: Fullscreen
|
|
||||||
|
|
||||||
### Shell
|
|
||||||
|
|
||||||
* `Shift + Up` : Traverse up in directory structure (lovely feature!)
|
|
||||||
* `End, Home, Ctrl` : Traversing text with as usual on Windows
|
|
||||||
* `Ctrl + r` : History search
|
|
||||||
* `Shift + mouse` : Select and copy text from buffer
|
|
||||||
|
|
||||||
(Some shortcuts are not yet documented, thought they exist, please add them here)
|
|
||||||
|
|
||||||
## Features
|
|
||||||
|
|
||||||
### Aliases
|
|
||||||
You can define simple aliases with command `alias name=command`.
|
|
||||||
|
|
||||||
For example there is one defined for you `alias e.=explorer .`
|
|
||||||
|
|
||||||
All aliases will be saved in `/config/aliases` file
|
|
||||||
|
|
||||||
## Todo
|
|
||||||
|
|
||||||
1. Complete PowerShell compatibility.
|
|
||||||
2. Workaround git.exe overload after msysgit download (Granted this is an upstream issue).
|
|
||||||
3. Redo Build/Pack scripts or remove them altogether.
|
|
||||||
4. Launcher XP compatibility.
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
All software included is bundled with own license
|
|
||||||
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2013 Samuel Vasko
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
57
appveyor.yml
Normal file
57
appveyor.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#---------------------------------#
|
||||||
|
# general configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
version: 1.0.{build}-{branch}
|
||||||
|
|
||||||
|
# branches to build
|
||||||
|
branches:
|
||||||
|
# blacklist
|
||||||
|
except:
|
||||||
|
- gh-pages
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# environment configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
# Operating system (build VM template)
|
||||||
|
os: Windows Server 2012 R2
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# build configuration #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- ps: cd scripts; .\build.ps1 -Compile -verbose
|
||||||
|
|
||||||
|
after_build:
|
||||||
|
- ps: .\pack.ps1 -verbose
|
||||||
|
|
||||||
|
# Disable test search, since we don't have any.
|
||||||
|
test: off
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# artifacts #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: build\cmder.zip
|
||||||
|
name: cmderzip
|
||||||
|
|
||||||
|
- path: build\cmder.7z
|
||||||
|
name: cmder7z
|
||||||
|
|
||||||
|
- path: build\cmder_mini.zip
|
||||||
|
name: cmdermini
|
||||||
|
|
||||||
|
#---------------------------------#
|
||||||
|
# notifications #
|
||||||
|
#---------------------------------#
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
# Webhook
|
||||||
|
- provider: Webhook
|
||||||
|
url: https://webhooks.gitter.im/e/d673abb1b2e659dcd625
|
||||||
|
on_build_success: true
|
||||||
|
on_build_failure: true
|
||||||
|
on_build_status_changed: true
|
@ -1,27 +1,63 @@
|
|||||||
@echo off
|
@echo off
|
||||||
if ["%1"] == ["/?"] goto:p_help
|
|
||||||
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
|
set ALIASES=%CMDER_ROOT%\config\aliases
|
||||||
::validate alias
|
|
||||||
setlocal
|
setlocal
|
||||||
for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G
|
:: handle quotes within command definition, e.g. quoted long file names
|
||||||
|
set _x="%*"
|
||||||
|
set _x=%_x:"=%
|
||||||
|
|
||||||
set _temp=%_temp2: =%
|
:: check command usage
|
||||||
|
if ["%_x%"] == [""] echo Use /? for help & echo. & goto :p_show
|
||||||
|
if ["%1"] == ["/?"] goto:p_help
|
||||||
|
if ["%1"] == ["/reload"] goto:p_reload
|
||||||
|
:: /d flag for delete existing alias
|
||||||
|
if ["%1"] == ["/d"] goto:p_del %*
|
||||||
|
:: if arg is an existing alias, display it
|
||||||
|
if ["%2"] == [""] (
|
||||||
|
doskey /macros | findstr /b %1= && goto:eof
|
||||||
|
echo Insufficient parameters. & goto:p_help
|
||||||
|
)
|
||||||
|
|
||||||
if not ["%_temp%"] == ["%_temp2%"] (
|
:: validate alias
|
||||||
|
for /f "delims== tokens=1" %%G in ("%_x%") do set alias=%%G
|
||||||
|
set _temp=%alias: =%
|
||||||
|
|
||||||
|
if not ["%_temp%"] == ["%alias%"] (
|
||||||
echo Your alias name can not contain a space
|
echo Your alias name can not contain a space
|
||||||
endlocal
|
endlocal
|
||||||
goto:eof
|
goto:eof
|
||||||
)
|
)
|
||||||
|
|
||||||
echo %* >> "%CMDER_ROOT%\config\aliases"
|
:: replace already defined alias
|
||||||
doskey /macrofile="%CMDER_ROOT%\config\aliases"
|
findstr /b /v /i "%alias%=" "%ALIASES%" >> "%ALIASES%.tmp"
|
||||||
echo Alias created
|
echo %* >> "%ALIASES%.tmp" && type "%ALIASES%.tmp" > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
|
||||||
|
doskey /macrofile="%ALIASES%"
|
||||||
endlocal
|
endlocal
|
||||||
goto:eof
|
goto:eof
|
||||||
|
|
||||||
|
:p_del
|
||||||
|
findstr /b /v /i "%2=" "%ALIASES%" >> "%ALIASES%.tmp"
|
||||||
|
type "%ALIASES%".tmp > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
|
||||||
|
doskey /macrofile=%ALIASES%
|
||||||
|
goto:eof
|
||||||
|
|
||||||
|
:p_reload
|
||||||
|
doskey /macrofile="%ALIASES%"
|
||||||
|
echo Aliases reloaded
|
||||||
|
goto:eof
|
||||||
|
|
||||||
|
:p_show
|
||||||
|
type "%ALIASES%" || echo No aliases found at "%ALIASES%"
|
||||||
|
goto :eof
|
||||||
|
|
||||||
:p_help
|
:p_help
|
||||||
echo.Usage:
|
echo.Usage:
|
||||||
echo. alias name=full command
|
echo. alias [/reload] [/d] [name=full command]
|
||||||
|
echo. /reload Reload the aliases file
|
||||||
|
echo. /d Delete an alias (must be followed by the alias name)
|
||||||
|
echo.
|
||||||
|
echo. If alias is called with any parameters, it will display the list of existing aliases.
|
||||||
|
echo. In the command, you can use the following notations:
|
||||||
echo. $* allows the alias to assume all the parameters of the supplied command.
|
echo. $* allows the alias to assume all the parameters of the supplied command.
|
||||||
echo. $1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
|
echo. $1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
|
||||||
echo. $T is the command seperator, allowing you to string several commands together into one alias.
|
echo. $T is the command seperator, allowing you to string several commands together into one alias.
|
||||||
|
125
build.rb
125
build.rb
@ -1,125 +0,0 @@
|
|||||||
# Samuel Vasko 2013
|
|
||||||
# Cmder build script
|
|
||||||
# Like really a beta
|
|
||||||
#
|
|
||||||
# This script downloads dependencies form google code. Each software is extracted
|
|
||||||
# in a folder with same name as the project on google code. So Conemu becomes
|
|
||||||
# conemu-maximus5. Correct files are beeing picked by using labels.
|
|
||||||
# I will move the script for getting files by labels from php to here as soon I feel like it
|
|
||||||
|
|
||||||
require 'fileutils'
|
|
||||||
require 'open-uri'
|
|
||||||
require 'uri'
|
|
||||||
|
|
||||||
def get_file project, query
|
|
||||||
urlToFile = URI.escape('http://samuelvasko.tk/gcode/?project='+project+'&query='+query)
|
|
||||||
open(urlToFile) do |resp|
|
|
||||||
urlToFile = URI.escape(resp.read.split(/\r?\n/).first)
|
|
||||||
end
|
|
||||||
|
|
||||||
extension = urlToFile.split('.').last
|
|
||||||
filename = project+'.'+extension
|
|
||||||
|
|
||||||
puts "\n ------ Downloading #{project} from #{urlToFile} ------- \n \n"
|
|
||||||
begin
|
|
||||||
open(urlToFile, 'rb') do |infile|
|
|
||||||
open(filename, 'wb') do |outfile|
|
|
||||||
outfile.write(infile.read)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
rescue IOError => error
|
|
||||||
puts error
|
|
||||||
FileUtils.rm(filename) if File.exists?(filename)
|
|
||||||
exit(1)
|
|
||||||
end
|
|
||||||
|
|
||||||
system("7z x -o\"#{project}\" #{filename}")
|
|
||||||
|
|
||||||
File.unlink(project+"."+extension);
|
|
||||||
|
|
||||||
# When the folder contains another folder
|
|
||||||
# that is not what we want
|
|
||||||
if Dir.glob("#{project}/*").length == 1
|
|
||||||
temp_name = "#{project}_temp"
|
|
||||||
FileUtils.mv(project, temp_name)
|
|
||||||
FileUtils.mv(Dir.glob("#{temp_name}/*")[0], project)
|
|
||||||
FileUtils.rm_r(temp_name)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_on_path exe
|
|
||||||
path = ENV['PATH'].split(File::PATH_SEPARATOR)
|
|
||||||
for dir in path
|
|
||||||
if File.exists?(File.join(dir, exe))
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
puts '
|
|
||||||
______ _ _ _ _ _
|
|
||||||
| ___ \ (_) | | (_) | |
|
|
||||||
| |_/ /_ _ _| | __| |_ _ __ __ _ ___ _ __ ___ __| | ___ _ __
|
|
||||||
| ___ \ | | | | |/ _` | | \'_ \ / _` | / __| \'_ ` _ \ / _` |/ _ \ \'__|
|
|
||||||
| |_/ / |_| | | | (_| | | | | | (_| | | (__| | | | | | (_| | __/ |
|
|
||||||
\____/ \__,_|_|_|\__,_|_|_| |_|\__, | \___|_| |_| |_|\__,_|\___|_|
|
|
||||||
__/ |
|
|
||||||
|___/
|
|
||||||
'
|
|
||||||
|
|
||||||
unless find_on_path('7z.exe')
|
|
||||||
puts '7z.exe not found. Ensure 7-zip is installed and on the PATH.'
|
|
||||||
exit(1)
|
|
||||||
end
|
|
||||||
|
|
||||||
build_exe = true
|
|
||||||
unless find_on_path('msbuild.exe')
|
|
||||||
puts 'msbuild.exe not found. We need that to build the executable.'
|
|
||||||
puts 'Do you want to continue? [Y/n]'
|
|
||||||
build_exe = false
|
|
||||||
exit(1) unless gets.chomp.downcase == 'y'
|
|
||||||
end
|
|
||||||
|
|
||||||
puts 'Cleanup'
|
|
||||||
|
|
||||||
if Dir.exists?('vendor')
|
|
||||||
Dir.glob('vendor/*') { |file| FileUtils.rm_rf(file) if File.directory?(file) }
|
|
||||||
end
|
|
||||||
|
|
||||||
Dir.chdir('vendor')
|
|
||||||
|
|
||||||
puts 'Getting files'
|
|
||||||
|
|
||||||
get_file('clink', 'label:Type-Archive label:Featured')
|
|
||||||
get_file('conemu-maximus5', 'label:Type-Archive label:Preview label:Featured')
|
|
||||||
get_file('msysgit', 'label:Type-Archive label:Featured')
|
|
||||||
|
|
||||||
puts 'Creating executable'
|
|
||||||
|
|
||||||
puts 'Build for XP? (Default: No)'
|
|
||||||
if gets.downcase =='yes' or 'y'
|
|
||||||
XP = true
|
|
||||||
elsif gets.downcase == 'no' or 'n'
|
|
||||||
XP = false
|
|
||||||
else
|
|
||||||
puts 'Defaulting to non-XP build'
|
|
||||||
XP = false
|
|
||||||
end
|
|
||||||
|
|
||||||
if build_exe
|
|
||||||
Dir.chdir('../launcher')
|
|
||||||
if XP
|
|
||||||
puts 'Building XP Compatible Launcher...'
|
|
||||||
status = system('msbuild /p:Configuration=ReleaseXP')
|
|
||||||
else
|
|
||||||
status = system('msbuild /p:Configuration=Release')
|
|
||||||
end
|
|
||||||
unless status
|
|
||||||
puts 'Looks like the build failed'
|
|
||||||
exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
puts 'Done, bye'
|
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<key name="Software">
|
<key name="Software">
|
||||||
<key name="ConEmu">
|
<key name="ConEmu">
|
||||||
<key name=".Vanilla" modified="2014-01-21 18:36:36" build="131215">
|
<key name=".Vanilla" modified="2015-11-24 14:43:35" build="151119">
|
||||||
<value name="ColorTable00" type="dword" data="00222827"/>
|
<value name="ColorTable00" type="dword" data="00222827"/>
|
||||||
<value name="ColorTable01" type="dword" data="009e5401"/>
|
<value name="ColorTable01" type="dword" data="009e5401"/>
|
||||||
<value name="ColorTable02" type="dword" data="0004aa74"/>
|
<value name="ColorTable02" type="dword" data="0004aa74"/>
|
||||||
@ -72,12 +72,12 @@
|
|||||||
<value name="StartType" type="hex" data="02"/>
|
<value name="StartType" type="hex" data="02"/>
|
||||||
<value name="CmdLine" type="string" data=""/>
|
<value name="CmdLine" type="string" data=""/>
|
||||||
<value name="StartTasksFile" type="string" data=""/>
|
<value name="StartTasksFile" type="string" data=""/>
|
||||||
<value name="StartTasksName" type="string" data="{cmd}"/>
|
<value name="StartTasksName" type="string" data="{cmd::Cmder}"/>
|
||||||
<value name="StartFarFolders" type="hex" data="00"/>
|
<value name="StartFarFolders" type="hex" data="00"/>
|
||||||
<value name="StartFarEditors" type="hex" data="00"/>
|
<value name="StartFarEditors" type="hex" data="00"/>
|
||||||
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
|
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
|
||||||
<value name="StoreTaskbarCommands" type="hex" data="00"/>
|
<value name="StoreTaskbarCommands" type="hex" data="00"/>
|
||||||
<value name="CmdLineHistory" type="multi"><line data=";C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"/></value>
|
<value name="CmdLineHistory" type="multi"></value>
|
||||||
<value name="SingleInstance" type="hex" data="00"/>
|
<value name="SingleInstance" type="hex" data="00"/>
|
||||||
<value name="ShowHelpTooltips" type="hex" data="01"/>
|
<value name="ShowHelpTooltips" type="hex" data="01"/>
|
||||||
<value name="Multi" type="hex" data="01"/>
|
<value name="Multi" type="hex" data="01"/>
|
||||||
@ -124,13 +124,13 @@
|
|||||||
<value name="ColorKeyValue" type="dword" data="00010101"/>
|
<value name="ColorKeyValue" type="dword" data="00010101"/>
|
||||||
<value name="UseCurrentSizePos" type="hex" data="01"/>
|
<value name="UseCurrentSizePos" type="hex" data="01"/>
|
||||||
<value name="WindowMode" type="dword" data="0000051f"/>
|
<value name="WindowMode" type="dword" data="0000051f"/>
|
||||||
<value name="ConWnd Width" type="dword" data="0000006f"/>
|
<value name="ConWnd Width" type="dword" data="00000078"/>
|
||||||
<value name="ConWnd Height" type="dword" data="0000001a"/>
|
<value name="ConWnd Height" type="dword" data="0000001e"/>
|
||||||
<value name="Cascaded" type="hex" data="01"/>
|
<value name="Cascaded" type="hex" data="01"/>
|
||||||
<value name="ConWnd X" type="dword" data="000000bc"/>
|
<value name="ConWnd X" type="dword" data="000001f4"/>
|
||||||
<value name="ConWnd Y" type="dword" data="00000065"/>
|
<value name="ConWnd Y" type="dword" data="000001f4"/>
|
||||||
<value name="16bit Height" type="dword" data="00000000"/>
|
<value name="16bit Height" type="dword" data="00000000"/>
|
||||||
<value name="AutoSaveSizePos" type="hex" data="00"/>
|
<value name="AutoSaveSizePos" type="hex" data="01"/>
|
||||||
<value name="IntegralSize" type="hex" data="00"/>
|
<value name="IntegralSize" type="hex" data="00"/>
|
||||||
<value name="QuakeStyle" type="hex" data="00"/>
|
<value name="QuakeStyle" type="hex" data="00"/>
|
||||||
<value name="QuakeAnimation" type="dword" data="0000012c"/>
|
<value name="QuakeAnimation" type="dword" data="0000012c"/>
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<value name="HideChildCaption" type="hex" data="01"/>
|
<value name="HideChildCaption" type="hex" data="01"/>
|
||||||
<value name="FocusInChildWindows" type="hex" data="01"/>
|
<value name="FocusInChildWindows" type="hex" data="01"/>
|
||||||
<value name="HideCaptionAlways" type="hex" data="00"/>
|
<value name="HideCaptionAlways" type="hex" data="00"/>
|
||||||
<value name="HideCaptionAlwaysFrame" type="hex" data="ff"/>
|
<value name="HideCaptionAlwaysFrame" type="hex" data="00"/>
|
||||||
<value name="HideCaptionAlwaysDelay" type="dword" data="000007d0"/>
|
<value name="HideCaptionAlwaysDelay" type="dword" data="000007d0"/>
|
||||||
<value name="HideCaptionAlwaysDisappear" type="dword" data="000007d0"/>
|
<value name="HideCaptionAlwaysDisappear" type="dword" data="000007d0"/>
|
||||||
<value name="DownShowHiddenMessage" type="hex" data="00"/>
|
<value name="DownShowHiddenMessage" type="hex" data="00"/>
|
||||||
@ -349,7 +349,7 @@
|
|||||||
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
||||||
<value name="SetFocusGui" type="dword" data="00000000"/>
|
<value name="SetFocusGui" type="dword" data="00000000"/>
|
||||||
<value name="SetFocusChild" type="dword" data="00000000"/>
|
<value name="SetFocusChild" type="dword" data="00000000"/>
|
||||||
<value name="ChildSystemMenu" type="dword" data="00000000"/>
|
<value name="ChildSystemMenu" type="dword" data="ffffffff"/>
|
||||||
<value name="Multi.NewConsole" type="dword" data="80808000"/>
|
<value name="Multi.NewConsole" type="dword" data="80808000"/>
|
||||||
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
||||||
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
|
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
|
||||||
@ -419,8 +419,8 @@
|
|||||||
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
||||||
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
||||||
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
||||||
<value name="KeyMacro05" type="dword" data="00000000"/>
|
<value name="KeyMacro05" type="dword" data="0012a033"/>
|
||||||
<value name="KeyMacro05.Text" type="string" data=""/>
|
<value name="KeyMacro05.Text" type="string" data="Task("PowerShell as Admin")"/>
|
||||||
<value name="KeyMacro06" type="dword" data="00000000"/>
|
<value name="KeyMacro06" type="dword" data="00000000"/>
|
||||||
<value name="KeyMacro06.Text" type="string" data=""/>
|
<value name="KeyMacro06.Text" type="string" data=""/>
|
||||||
<value name="KeyMacro07" type="dword" data="00000000"/>
|
<value name="KeyMacro07" type="dword" data="00000000"/>
|
||||||
@ -483,30 +483,89 @@
|
|||||||
<value name="DndLKey" type="hex" data="00"/>
|
<value name="DndLKey" type="hex" data="00"/>
|
||||||
<value name="DndRKey" type="hex" data="a2"/>
|
<value name="DndRKey" type="hex" data="a2"/>
|
||||||
<value name="WndDragKey" type="dword" data="00121101"/>
|
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||||
<key name="Tasks" modified="2014-01-21 18:36:36" build="131215">
|
<key name="Tasks" modified="2015-11-24 14:43:35" build="151119">
|
||||||
<value name="Count" type="dword" data="00000002"/>
|
<value name="Count" type="dword" data="00000008"/>
|
||||||
<key name="Task1" modified="2014-01-21 18:36:36" build="131215">
|
<key name="Task1" modified="2015-11-24 14:49:10" build="151119">
|
||||||
<value name="Name" type="string" data="{cmd}"/>
|
<value name="Name" type="string" data="{cmd::Cmder as Admin}"/>
|
||||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\cmder.exe""/>
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||||
<value name="Cmd1" type="string" data="cmd /k "%CMDER_ROOT%\vendor\init.bat" -new_console:d:%USERPROFILE%"/>
|
<value name="Cmd1" type="string" data="*cmd /k "%ConEmuDir%\..\init.bat" -new_console:d:%USERPROFILE%"/>
|
||||||
<value name="Active" type="dword" data="00000000"/>
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
<value name="Count" type="dword" data="00000001"/>
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
<value name="Hotkey" type="dword" data="00000000"/>
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
</key>
|
</key>
|
||||||
<key name="Task2" modified="2014-01-21 18:36:36" build="131215">
|
<key name="Task2" modified="2015-11-24 14:49:10" build="151119">
|
||||||
<value name="Name" type="string" data="{PowerShell}"/>
|
<value name="Name" type="string" data="{cmd::Cmder}"/>
|
||||||
<value name="GuiArgs" type="string" data="/dir "%userprofile%""/>
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||||
<value name="Cmd1" type="string" data="powershell"/>
|
<value name="Cmd1" type="string" data="cmd /k "%ConEmuDir%\..\init.bat" -new_console:d:%USERPROFILE%"/>
|
||||||
<value name="Active" type="dword" data="00000000"/>
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
<value name="Count" type="dword" data="00000001"/>
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
<value name="Hotkey" type="dword" data="00000000"/>
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
</key>
|
||||||
|
<key name="Task3" modified="2015-11-24 14:49:10" build="151119">
|
||||||
|
<value name="Name" type="string" data="{Powershell::PowerShell as Admin}"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||||
|
<value name="Cmd1" type="string" data="*PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''" -new_console:d:"%USERPROFILE%""/>
|
||||||
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
</key>
|
||||||
|
<key name="Task4" modified="2015-11-24 14:49:10" build="151119">
|
||||||
|
<value name="Name" type="string" data="{Powershell::Powershell}"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||||
|
<value name="Cmd1" type="string" data="PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''" -new_console:d:"%USERPROFILE%""/>
|
||||||
|
<value name="Cmd2" type="string" data="%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe"/>
|
||||||
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
</key>
|
||||||
|
<key name="Task5" modified="2015-11-24 14:49:10" build="151119">
|
||||||
|
<value name="Name" type="string" data="{bash::mintty as Admin}"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="GuiArgs" type="string" data="/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico""/>
|
||||||
|
<value name="Cmd1" type="string" data="*%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe /bin/bash -l -new_console:d:%USERPROFILE%"/>
|
||||||
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
</key>
|
||||||
|
<key name="Task6" modified="2015-11-24 14:49:10" build="151119">
|
||||||
|
<value name="Name" type="string" data="{bash::mintty}"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="GuiArgs" type="string" data="/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico""/>
|
||||||
|
<value name="Cmd1" type="string" data="%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe /bin/bash -l -new_console:d:%userProfile%"/>
|
||||||
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
<value name="Cmd2" type="string" data="%CMDER_ROOT%vendor\git-for-windows\usr\bin\mintty.exe /bin/bash -l -new_console:d:%userProfile%"/>
|
||||||
|
</key>
|
||||||
|
<key name="Task7" modified="2015-11-24 14:49:10" build="151119">
|
||||||
|
<value name="Name" type="string" data="{bash::bash as Admin}"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||||
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
|
<value name="Cmd1" type="string" data="*cmd /c "%ConEmuDir%\..\git-for-windows\bin\bash --login -i" -new_console:d:%USERPROFILE%"/>
|
||||||
|
</key>
|
||||||
|
<key name="Task8" modified="2015-11-24 14:49:10" build="151119">
|
||||||
|
<value name="Name" type="string" data="{bash::bash}"/>
|
||||||
|
<value name="Flags" type="dword" data="00000000"/>
|
||||||
|
<value name="Hotkey" type="dword" data="00000000"/>
|
||||||
|
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||||
|
<value name="Cmd1" type="string" data="cmd /c "%ConEmuDir%\..\git-for-windows\bin\bash --login -i" -new_console:d:%USERPROFILE%"/>
|
||||||
|
<value name="Active" type="dword" data="00000000"/>
|
||||||
|
<value name="Count" type="dword" data="00000001"/>
|
||||||
</key>
|
</key>
|
||||||
</key>
|
</key>
|
||||||
<key name="Apps" modified="2014-01-21 18:36:36" build="131215">
|
|
||||||
|
<key name="Apps" modified="2015-11-24 14:49:10" build="151119">
|
||||||
<value name="Count" type="dword" data="00000000"/>
|
<value name="Count" type="dword" data="00000000"/>
|
||||||
</key>
|
</key>
|
||||||
<key name="Colors" modified="2014-01-31 17:13:53" build="131107">
|
<key name="Colors" modified="2015-11-24 14:49:10" build="151119">
|
||||||
<key name="Palette1" modified="2014-01-31 17:13:53" build="131107">
|
<key name="Palette1" modified="2015-11-24 14:49:10" build="151119">
|
||||||
<value name="Name" type="string" data="Monokai"/>
|
<value name="Name" type="string" data="Monokai"/>
|
||||||
<value name="ExtendColors" type="hex" data="00"/>
|
<value name="ExtendColors" type="hex" data="00"/>
|
||||||
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
||||||
@ -581,6 +640,223 @@
|
|||||||
<value name="TransparencyDec" type="dword" data="00000000"/>
|
<value name="TransparencyDec" type="dword" data="00000000"/>
|
||||||
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
|
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
|
||||||
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
|
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
|
||||||
|
<value name="DefaultTerminalAgressive" type="hex" data="01"/>
|
||||||
|
<value name="DefaultTerminalNewWindow" type="hex" data="00"/>
|
||||||
|
<value name="AnsiLog" type="hex" data="00"/>
|
||||||
|
<value name="AnsiLogPath" type="string" data="%ConEmuDir%\Logs\"/>
|
||||||
|
<value name="Multi.DupConfirm" type="hex" data="01"/>
|
||||||
|
<value name="Multi.DetachConfirm" type="hex" data="01"/>
|
||||||
|
<value name="CTS.Intelligent" type="hex" data="01"/>
|
||||||
|
<value name="CTS.IntelligentExceptions" type="string" data="far|vim.exe"/>
|
||||||
|
<value name="StatusBar.Hide.Time" type="hex" data="01"/>
|
||||||
|
<value name="TaskbarProgress" type="hex" data="01"/>
|
||||||
|
<value name="RetardInactivePanes" type="hex" data="00"/>
|
||||||
|
<value name="ProcessCmdStart" type="hex" data="01"/>
|
||||||
|
<value name="Multi.ShowSearch" type="hex" data="01"/>
|
||||||
|
<value name="Multi.CloseConfirmFlags" type="hex" data="04"/>
|
||||||
|
<value name="FontUseDpi" type="hex" data="01"/>
|
||||||
|
<value name="FontUseUnits" type="hex" data="00"/>
|
||||||
|
<value name="UseScrollLock" type="hex" data="01"/>
|
||||||
|
<value name="CTS.ForceLocale" type="dword" data="00000000"/>
|
||||||
|
<value name="StatusBar.Hide.VisL" type="hex" data="01"/>
|
||||||
|
<value name="StatusBar.Hide.KeyHooks" type="hex" data="01"/>
|
||||||
|
<value name="StatusBar.Hide.WVBack" type="hex" data="01"/>
|
||||||
|
<value name="StatusBar.Hide.WVDC" type="hex" data="01"/>
|
||||||
|
<value name="StatusBar.Hide.Zoom" type="hex" data="01"/>
|
||||||
|
<value name="StatusBar.Hide.Dpi" type="hex" data="01"/>
|
||||||
|
<value name="TabFlashChanged" type="dword" data="00000008"/>
|
||||||
|
<value name="TabModifiedSuffix" type="string" data="[*]"/>
|
||||||
|
<key name="HotKeys" modified="2015-11-24 14:43:35" build="151119">
|
||||||
|
<value name="KeyMacroVersion" type="hex" data="02"/>
|
||||||
|
<value name="Multi.Modifier" type="dword" data="00000011"/>
|
||||||
|
<value name="Multi.ArrowsModifier" type="dword" data="0000005b"/>
|
||||||
|
<value name="MinimizeRestore" type="dword" data="000011c0"/>
|
||||||
|
<value name="MinimizeRestore2" type="dword" data="00000000"/>
|
||||||
|
<value name="GlobalRestore" type="dword" data="00000000"/>
|
||||||
|
<value name="CdExplorerPath" type="dword" data="00000000"/>
|
||||||
|
<value name="ForcedFullScreen" type="dword" data="12115b0d"/>
|
||||||
|
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
||||||
|
<value name="SetFocusGui" type="dword" data="00000000"/>
|
||||||
|
<value name="SetFocusChild" type="dword" data="00000000"/>
|
||||||
|
<value name="ChildSystemMenu" type="dword" data="000011ff"/>
|
||||||
|
<value name="Multi.NewConsole" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
||||||
|
<value name="Multi.CmdKey" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewWindow" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewConsolePopup" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewConsolePopup2" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewAttach" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewSplitV" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NewSplitH" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.SplitMaximize" type="dword" data="00005d0d"/>
|
||||||
|
<value name="Multi.SplitSizeVU" type="dword" data="00105d26"/>
|
||||||
|
<value name="Multi.SplitSizeVD" type="dword" data="00105d28"/>
|
||||||
|
<value name="Multi.SplitSizeHL" type="dword" data="00105d25"/>
|
||||||
|
<value name="Multi.SplitSizeHR" type="dword" data="00105d27"/>
|
||||||
|
<value name="Key.TabPane1" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.TabPane2" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.SplitFocusU" type="dword" data="00005d26"/>
|
||||||
|
<value name="Multi.SplitFocusD" type="dword" data="00005d28"/>
|
||||||
|
<value name="Multi.SplitFocusL" type="dword" data="00005d25"/>
|
||||||
|
<value name="Multi.SplitFocusR" type="dword" data="00005d27"/>
|
||||||
|
<value name="Multi.Next" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.NextShift" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.Recreate" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.AltCon" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.Pause" type="dword" data="80808013"/>
|
||||||
|
<value name="Multi.Scroll" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.GroupInput" type="dword" data="00005d47"/>
|
||||||
|
<value name="Multi.Detach" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.Close" type="dword" data="00001157"/>
|
||||||
|
<value name="CloseTabKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseGroupKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseGroupPrcKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseAllConKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseZombiesKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseExceptConKey" type="dword" data="00000000"/>
|
||||||
|
<value name="KillProcessKey" type="dword" data="00000000"/>
|
||||||
|
<value name="KillAllButShellKey" type="dword" data="00105b2e"/>
|
||||||
|
<value name="DuplicateRootKey" type="dword" data="00000000"/>
|
||||||
|
<value name="CloseConEmuKey" type="dword" data="00001273"/>
|
||||||
|
<value name="Multi.Rename" type="dword" data="00000000"/>
|
||||||
|
<value name="AffinityPriorityKey" type="dword" data="00005d41"/>
|
||||||
|
<value name="Multi.MoveLeft" type="dword" data="00125b25"/>
|
||||||
|
<value name="Multi.MoveRight" type="dword" data="00125b27"/>
|
||||||
|
<value name="CTS.VkBlockStart" type="dword" data="00000000"/>
|
||||||
|
<value name="CTS.VkTextStart" type="dword" data="00000000"/>
|
||||||
|
<value name="CTS.VkCopyFmt0" type="dword" data="00001143"/>
|
||||||
|
<value name="CTS.VkCopyFmt1" type="dword" data="00101143"/>
|
||||||
|
<value name="CTS.VkCopyFmt2" type="dword" data="00000000"/>
|
||||||
|
<value name="CTS.VkCopyAll" type="dword" data="00000000"/>
|
||||||
|
<value name="HighlightMouseSwitch" type="dword" data="00005d4c"/>
|
||||||
|
<value name="HighlightMouseSwitchX" type="dword" data="00005d58"/>
|
||||||
|
<value name="Multi.ShowTabsList" type="dword" data="00000000"/>
|
||||||
|
<value name="Multi.ShowTabsList2" type="dword" data="00000000"/>
|
||||||
|
<value name="ClipboardVkAllLines" type="dword" data="0000102d"/>
|
||||||
|
<value name="ClipboardVkFirstLine" type="dword" data="00001156"/>
|
||||||
|
<value name="DeleteWordToLeft" type="dword" data="00001108"/>
|
||||||
|
<value name="FindTextKey" type="dword" data="00005d46"/>
|
||||||
|
<value name="ScreenshotKey" type="dword" data="00000000"/>
|
||||||
|
<value name="ScreenshotFullKey" type="dword" data="00000000"/>
|
||||||
|
<value name="ShowStatusBarKey" type="dword" data="00000000"/>
|
||||||
|
<value name="ShowTabBarKey" type="dword" data="00000000"/>
|
||||||
|
<value name="ShowCaptionKey" type="dword" data="00000000"/>
|
||||||
|
<value name="AlwaysOnTopKey" type="dword" data="00000000"/>
|
||||||
|
<value name="TransparencyInc" type="dword" data="00000000"/>
|
||||||
|
<value name="TransparencyDec" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.TabMenu" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.TabMenu2" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.Maximize" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.TileToLeft" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.TileToRight" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.JumpPrevMonitor" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.JumpNextMonitor" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.FullScreen" type="dword" data="0000120d"/>
|
||||||
|
<value name="Key.SysMenu" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.SysMenu2" type="dword" data="00001102"/>
|
||||||
|
<value name="Key.BufUp" type="dword" data="00001126"/>
|
||||||
|
<value name="Key.BufDn" type="dword" data="00001128"/>
|
||||||
|
<value name="Key.BufPgUp" type="dword" data="00001121"/>
|
||||||
|
<value name="Key.BufPgDn" type="dword" data="00001122"/>
|
||||||
|
<value name="Key.BufHfPgUp" type="dword" data="00005d21"/>
|
||||||
|
<value name="Key.BufHfPgDn" type="dword" data="00005d22"/>
|
||||||
|
<value name="Key.BufTop" type="dword" data="00005d24"/>
|
||||||
|
<value name="Key.BufBottom" type="dword" data="00005d23"/>
|
||||||
|
<value name="Key.BufCursor" type="dword" data="00005d08"/>
|
||||||
|
<value name="FontLargerKey" type="dword" data="00000000"/>
|
||||||
|
<value name="FontSmallerKey" type="dword" data="00000000"/>
|
||||||
|
<value name="FontOriginalKey" type="dword" data="00001104"/>
|
||||||
|
<value name="PasteFileKey" type="dword" data="00101146"/>
|
||||||
|
<value name="PastePathKey" type="dword" data="00101144"/>
|
||||||
|
<value name="PasteCygwinKey" type="dword" data="00005d2d"/>
|
||||||
|
<value name="KeyMacro01" type="dword" data="00a01231"/>
|
||||||
|
<value name="KeyMacro01.Text" type="string" data="Task(1)"/>
|
||||||
|
<value name="KeyMacro02" type="dword" data="00a01232"/>
|
||||||
|
<value name="KeyMacro02.Text" type="string" data="Task(2)"/>
|
||||||
|
<value name="KeyMacro03" type="dword" data="000011d0"/>
|
||||||
|
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
||||||
|
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
||||||
|
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
||||||
|
<value name="KeyMacro05" type="dword" data="00a01233"/>
|
||||||
|
<value name="KeyMacro05.Text" type="string" data="Task(3)"/>
|
||||||
|
<value name="KeyMacro06" type="dword" data="00a01234"/>
|
||||||
|
<value name="KeyMacro06.Text" type="string" data="Task(4)"/>
|
||||||
|
<value name="KeyMacro07" type="dword" data="00a01235"/>
|
||||||
|
<value name="KeyMacro07.Text" type="string" data="Task(5)"/>
|
||||||
|
<value name="KeyMacro08" type="dword" data="00a01236"/>
|
||||||
|
<value name="KeyMacro08.Text" type="string" data="Task(6)"/>
|
||||||
|
<value name="KeyMacro09" type="dword" data="00a01237"/>
|
||||||
|
<value name="KeyMacro09.Text" type="string" data="Task(7)"/>
|
||||||
|
<value name="KeyMacro10" type="dword" data="00a01238"/>
|
||||||
|
<value name="KeyMacro10.Text" type="string" data="Task(8)"/>
|
||||||
|
<value name="KeyMacro11" type="dword" data="00a01239"/>
|
||||||
|
<value name="KeyMacro11.Text" type="string" data="Task(9)"/>
|
||||||
|
<value name="KeyMacro12" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro12.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro13" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro13.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro14" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro14.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro15" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro15.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro16" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro16.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro17" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro17.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro18" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro18.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro19" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro19.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro20" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro20.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro21" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro21.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro22" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro22.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro23" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro23.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro24" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro24.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro25" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro25.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro26" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro26.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro27" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro27.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro28" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro28.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro29" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro29.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro30" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro30.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro31" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro31.Text" type="string" data=""/>
|
||||||
|
<value name="KeyMacro32" type="dword" data="00000000"/>
|
||||||
|
<value name="KeyMacro32.Text" type="string" data=""/>
|
||||||
|
<value name="CTS.VkBlock" type="hex" data="a4"/>
|
||||||
|
<value name="CTS.VkText" type="hex" data="a0"/>
|
||||||
|
<value name="CTS.VkAct" type="hex" data="00"/>
|
||||||
|
<value name="CTS.VkPrompt" type="hex" data="00"/>
|
||||||
|
<value name="FarGotoEditorVk" type="hex" data="a2"/>
|
||||||
|
<value name="DndLKey" type="hex" data="00"/>
|
||||||
|
<value name="DndRKey" type="hex" data="a2"/>
|
||||||
|
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||||
|
<value name="Multi.Unfasten" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.DebugProcess" type="dword" data="00105b44"/>
|
||||||
|
<value name="Key.DumpProcess" type="dword" data="00000000"/>
|
||||||
|
<value name="Key.DumpTree" type="dword" data="00000000"/>
|
||||||
|
</key>
|
||||||
|
<value name="StartCreateDelay" type="dword" data="00000064"/>
|
||||||
|
<value name="DefaultTerminalDebugLog" type="hex" data="00"/>
|
||||||
|
<value name="LastMonitor" type="string" data="0,0,1920,1020"/>
|
||||||
|
<value name="Restore2ActiveMon" type="hex" data="00"/>
|
||||||
|
<value name="DownShowExOnTopMessage" type="hex" data="00"/>
|
||||||
|
<value name="EnvironmentSet" type="multi"/>
|
||||||
|
<value name="Update.InetTool" type="hex" data="00"/>
|
||||||
|
<value name="Update.InetToolCmd" type="string" data=""/>
|
||||||
|
<value name="SuppressBells" type="hex" data="01"/>
|
||||||
</key>
|
</key>
|
||||||
</key>
|
</key>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
## Config
|
## Config
|
||||||
|
|
||||||
All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked.
|
All config files must be in this folder. If there is no option to set this folder
|
||||||
|
directly, it has to be hardlinked.
|
||||||
|
|
||||||
|
* `aliases`: aliases in cmd; called form vendor\init.bat; autocreated from
|
||||||
|
`vendor\aliases.example`.
|
||||||
|
* `*.lua`: clink completitions and prompt filters; called from vendor\cmder.lua after all
|
||||||
|
other prompt filter and clink completitons are initialized; add your own.
|
||||||
|
* `user_profile.{sh|bat|ps1}`: startup files for bash|cmd|powershell tasks; called from their
|
||||||
|
respective startup scripts in `vendor\`; autocreated on first start of such a task
|
||||||
|
* `.history`: the current commandline history; autoupdated on close
|
||||||
|
* `settings`: settings for readline; overwritten on update
|
||||||
|
* `ConEmu.xml`: settings from ConEmu (=the UI of cmder -> Preferences); overwritten on update
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
e.=explorer .
|
|
||||||
gl=git log --oneline --all --graph --decorate $*
|
|
||||||
ls=ls --color $*
|
|
||||||
pwd=cd
|
|
||||||
clear=cls
|
|
@ -1,50 +0,0 @@
|
|||||||
---
|
|
||||||
-- Find out current branch
|
|
||||||
-- @return {false|git branch name}
|
|
||||||
---
|
|
||||||
function get_git_branch()
|
|
||||||
for line in io.popen("git branch 2>nul"):lines() do
|
|
||||||
local m = line:match("%* (.+)$")
|
|
||||||
if m then
|
|
||||||
return m
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
---
|
|
||||||
-- Get the status of working dir
|
|
||||||
-- @return {bool}
|
|
||||||
---
|
|
||||||
function get_git_status()
|
|
||||||
return os.execute("git diff --quiet --ignore-submodules HEAD")
|
|
||||||
end
|
|
||||||
|
|
||||||
function git_prompt_filter()
|
|
||||||
|
|
||||||
-- Colors for git status
|
|
||||||
local colors = {
|
|
||||||
clean = "\x1b[1;37;40m",
|
|
||||||
dirty = "\x1b[31;1m",
|
|
||||||
}
|
|
||||||
|
|
||||||
local branch = get_git_branch()
|
|
||||||
if branch then
|
|
||||||
-- Has branch => therefore it is a git folder, now figure out status
|
|
||||||
if get_git_status() then
|
|
||||||
color = colors.clean
|
|
||||||
else
|
|
||||||
color = colors.dirty
|
|
||||||
end
|
|
||||||
|
|
||||||
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..branch..")")
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
-- No git present or not in git file
|
|
||||||
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", "")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
clink.prompt.register_filter(git_prompt_filter, 50)
|
|
@ -1,5 +0,0 @@
|
|||||||
function lambda_prompt_filter()
|
|
||||||
clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "λ")
|
|
||||||
end
|
|
||||||
|
|
||||||
clink.prompt.register_filter(lambda_prompt_filter, 40)
|
|
@ -1,43 +0,0 @@
|
|||||||
# name: Ctrl-D exits
|
|
||||||
# type: bool
|
|
||||||
# Ctrl-D exits the process when it is pressed on an empty line.
|
|
||||||
ctrld_exits = 1
|
|
||||||
|
|
||||||
# name: Ctrl-C raises exception
|
|
||||||
# type: bool
|
|
||||||
# When Ctrl-C is pressed Clink will pass it thourgh to the parent by raising the
|
|
||||||
# appropriate exception.
|
|
||||||
passthrough_ctrlc = 1
|
|
||||||
|
|
||||||
# name: Esc clears line
|
|
||||||
# type: bool
|
|
||||||
# Clink clears the current line when Esc is pressed (unless Readline's Vi mode
|
|
||||||
# is enabled).
|
|
||||||
esc_clears_line = 1
|
|
||||||
|
|
||||||
# name: Match display colour
|
|
||||||
# type: int
|
|
||||||
# Colour to use when displaying matches. A value less than 0 will be the
|
|
||||||
# opposite brightness of the default colour.
|
|
||||||
match_colour = -1
|
|
||||||
|
|
||||||
# name: Executable match style
|
|
||||||
# type: enum
|
|
||||||
# Changes how Clink will match executables when there is no path separator on
|
|
||||||
# the line. 0 = PATH only, 1 = PATH and CWD, 2 = PATH, CWD, and directories. In
|
|
||||||
# all cases both executables and directories are matched when there is a path
|
|
||||||
# separator present.
|
|
||||||
exec_match_style = -1
|
|
||||||
|
|
||||||
# name: Prompt colour
|
|
||||||
# type: int
|
|
||||||
# Surrounds the prompt in ANSI escape codes to set the prompt's colour. Disabled
|
|
||||||
# when the value is less than 0.
|
|
||||||
prompt_colour = -1
|
|
||||||
|
|
||||||
# name: Auto-answer terminate prompt
|
|
||||||
# type: enum
|
|
||||||
# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
|
|
||||||
# disabled, 1 = answer 'Y', 2 = answer 'N'.
|
|
||||||
terminate_autoanswer = 0
|
|
||||||
|
|
@ -1,26 +1,20 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Express 2013 for Windows Desktop
|
# Visual Studio 14
|
||||||
VisualStudioVersion = 12.0.21005.1
|
VisualStudioVersion = 14.0.23107.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmderLauncher", "CmderLauncher.vcxproj", "{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmderLauncher", "CmderLauncher.vcxproj", "{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
DebugXP|Win32 = DebugXP|Win32
|
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
ReleaseXP|Win32 = ReleaseXP|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.ActiveCfg = Debug|Win32
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.Build.0 = Debug|Win32
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.DebugXP|Win32.ActiveCfg = DebugXP|Win32
|
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.DebugXP|Win32.Build.0 = DebugXP|Win32
|
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.ActiveCfg = Release|Win32
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.Build.0 = Release|Win32
|
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.Build.0 = Release|Win32
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.ReleaseXP|Win32.ActiveCfg = ReleaseXP|Win32
|
|
||||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.ReleaseXP|Win32.Build.0 = ReleaseXP|Win32
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -1,18 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="DebugXP|Win32">
|
|
||||||
<Configuration>DebugXP</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="ReleaseXP|Win32">
|
|
||||||
<Configuration>ReleaseXP</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
@ -27,26 +19,13 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140_xp</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v120_xp</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140_xp</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v120_xp</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@ -56,32 +35,18 @@
|
|||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<TargetName>Cmder</TargetName>
|
<TargetName>Cmder</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<TargetName>Cmder</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetName>Cmder</TargetName>
|
<TargetName>Cmder</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
<TargetName>Cmder</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
@ -96,20 +61,6 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;XP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
@ -121,28 +72,7 @@
|
|||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<SDLCheck>true</SDLCheck>
|
||||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
</Link>
|
|
||||||
<PostBuildEvent>
|
|
||||||
<Command>copy $(TargetPath) $(SolutionDir)..\$(TargetFileName)</Command>
|
|
||||||
</PostBuildEvent>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<PrecompiledHeader>
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<Optimization>MinSpace</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@ -155,7 +85,9 @@
|
|||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="src\Resource.rc" />
|
<ResourceCompile Include="src\Resource.rc">
|
||||||
|
<FileType>RC</FileType>
|
||||||
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="src\resource.h" />
|
<ClInclude Include="src\resource.h" />
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
#pragma comment(lib, "Shlwapi.lib")
|
#pragma comment(lib, "Shlwapi.lib")
|
||||||
|
|
||||||
#ifndef UNICODE
|
#ifndef UNICODE
|
||||||
@ -12,10 +13,13 @@
|
|||||||
|
|
||||||
#define USE_TASKBAR_API (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
|
#define USE_TASKBAR_API (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
|
||||||
|
|
||||||
#define MB_TITLE L"Cmder Launcher"
|
#define XP (_WIN32_WINNT < _WIN32_WINNT_VISTA)
|
||||||
#define SHELL_MENU_REGISTRY_PATH L"Directory\\Background\\shell\\Cmder"
|
|
||||||
|
|
||||||
#define streqi(a, b) (_wcsicmp((a), (b)) == 0)
|
#define MB_TITLE L"Cmder Launcher"
|
||||||
|
#define SHELL_MENU_REGISTRY_PATH_BACKGROUND L"Directory\\Background\\shell\\Cmder"
|
||||||
|
#define SHELL_MENU_REGISTRY_PATH_LISTITEM L"Directory\\shell\\Cmder"
|
||||||
|
|
||||||
|
#define streqi(a, b) (_wcsicmp((a), (b)) == 0)
|
||||||
|
|
||||||
#define WIDEN2(x) L ## x
|
#define WIDEN2(x) L ## x
|
||||||
#define WIDEN(x) WIDEN2(x)
|
#define WIDEN(x) WIDEN2(x)
|
||||||
@ -26,7 +30,7 @@
|
|||||||
void ShowErrorAndExit(DWORD ec, const wchar_t * func, int line)
|
void ShowErrorAndExit(DWORD ec, const wchar_t * func, int line)
|
||||||
{
|
{
|
||||||
wchar_t * buffer;
|
wchar_t * buffer;
|
||||||
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||||
NULL, ec, 0, (LPWSTR) &buffer, 0, NULL) == 0)
|
NULL, ec, 0, (LPWSTR) &buffer, 0, NULL) == 0)
|
||||||
{
|
{
|
||||||
buffer = L"Unknown error. FormatMessage failed.";
|
buffer = L"Unknown error. FormatMessage failed.";
|
||||||
@ -60,10 +64,12 @@ optpair GetOption()
|
|||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
|
// no commandline argument...
|
||||||
pair = optpair(L"/START", L"");
|
pair = optpair(L"/START", L"");
|
||||||
}
|
}
|
||||||
else if (argc == 2 && argv[1][0] != L'/')
|
else if (argc == 2 && argv[1][0] != L'/')
|
||||||
{
|
{
|
||||||
|
// only a single argument: this should be a path...
|
||||||
pair = optpair(L"/START", argv[1]);
|
pair = optpair(L"/START", argv[1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -76,7 +82,20 @@ optpair GetOption()
|
|||||||
return pair;
|
return pair;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartCmder(std::wstring path)
|
bool FileExists(const wchar_t * filePath)
|
||||||
|
{
|
||||||
|
HANDLE hFile = CreateFile(filePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
|
|
||||||
|
if (hFile != INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartCmder(std::wstring path, bool is_single_mode)
|
||||||
{
|
{
|
||||||
#if USE_TASKBAR_API
|
#if USE_TASKBAR_API
|
||||||
wchar_t appId[MAX_PATH] = { 0 };
|
wchar_t appId[MAX_PATH] = { 0 };
|
||||||
@ -84,6 +103,7 @@ void StartCmder(std::wstring path)
|
|||||||
wchar_t exeDir[MAX_PATH] = { 0 };
|
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||||
wchar_t icoPath[MAX_PATH] = { 0 };
|
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||||
wchar_t cfgPath[MAX_PATH] = { 0 };
|
wchar_t cfgPath[MAX_PATH] = { 0 };
|
||||||
|
wchar_t oldCfgPath[MAX_PATH] = { 0 };
|
||||||
wchar_t conEmuPath[MAX_PATH] = { 0 };
|
wchar_t conEmuPath[MAX_PATH] = { 0 };
|
||||||
wchar_t args[MAX_PATH * 2 + 256] = { 0 };
|
wchar_t args[MAX_PATH * 2 + 256] = { 0 };
|
||||||
|
|
||||||
@ -96,13 +116,54 @@ void StartCmder(std::wstring path)
|
|||||||
PathRemoveFileSpec(exeDir);
|
PathRemoveFileSpec(exeDir);
|
||||||
|
|
||||||
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||||
PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml");
|
|
||||||
|
// Check for machine-specific config file.
|
||||||
|
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml");
|
||||||
|
ExpandEnvironmentStrings(oldCfgPath, oldCfgPath, sizeof(oldCfgPath) / sizeof(oldCfgPath[0]));
|
||||||
|
if (!PathFileExists(oldCfgPath)) {
|
||||||
|
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for machine-specific config file.
|
||||||
|
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu-%COMPUTERNAME%.xml");
|
||||||
|
ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0]));
|
||||||
|
if (!PathFileExists(cfgPath)) {
|
||||||
|
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
|
||||||
|
}
|
||||||
|
|
||||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||||
|
|
||||||
swprintf_s(args, L"/Icon \"%s\" /Title Cmder /LoadCfgFile \"%s\"", icoPath, cfgPath);
|
if (FileExists(oldCfgPath) && !FileExists(cfgPath))
|
||||||
|
{
|
||||||
|
if (!CopyFile(oldCfgPath, cfgPath, FALSE))
|
||||||
|
{
|
||||||
|
MessageBox(NULL,
|
||||||
|
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||||
|
? L"Failed to copy ConEmu.xml file to new location! Restart cmder as administrator."
|
||||||
|
: L"Failed to copy ConEmu.xml file to new location!", MB_TITLE, MB_ICONSTOP);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_single_mode)
|
||||||
|
{
|
||||||
|
swprintf_s(args, L"/single /Icon \"%s\" /Title Cmder", icoPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
swprintf_s(args, L"/Icon \"%s\" /Title Cmder", icoPath);
|
||||||
|
}
|
||||||
|
|
||||||
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
||||||
SetEnvironmentVariable(L"CMDER_START", path.c_str());
|
if (!streqi(path.c_str(), L""))
|
||||||
|
{
|
||||||
|
if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) {
|
||||||
|
MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Ensure EnvironmentVariables are propagated.
|
||||||
|
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL);
|
||||||
|
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8
|
||||||
|
|
||||||
STARTUPINFO si = { 0 };
|
STARTUPINFO si = { 0 };
|
||||||
si.cb = sizeof(STARTUPINFO);
|
si.cb = sizeof(STARTUPINFO);
|
||||||
@ -112,8 +173,10 @@ void StartCmder(std::wstring path)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
|
if (!CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) {
|
||||||
CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi);
|
MessageBox(NULL, _T("Unable to create the ConEmu Process!"), _T("Error"), MB_OK);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsUserOnly(std::wstring opt)
|
bool IsUserOnly(std::wstring opt)
|
||||||
@ -154,30 +217,42 @@ HKEY GetRootKey(std::wstring opt)
|
|||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterShellMenu(std::wstring opt)
|
void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||||
{
|
{
|
||||||
HKEY root = GetRootKey(opt);
|
// First, get the paths we will use
|
||||||
|
|
||||||
HKEY cmderKey;
|
|
||||||
FAIL_ON_ERROR(
|
|
||||||
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 0, NULL,
|
|
||||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
|
||||||
|
|
||||||
FAIL_ON_ERROR(RegSetValue(cmderKey, L"", REG_SZ, L"Cmder Here", NULL));
|
|
||||||
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"NoWorkingDirectory", 0, REG_SZ, (BYTE *)L"", 2));
|
|
||||||
|
|
||||||
HKEY command;
|
|
||||||
FAIL_ON_ERROR(
|
|
||||||
RegCreateKeyEx(cmderKey, L"command", 0, NULL,
|
|
||||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &command, NULL));
|
|
||||||
|
|
||||||
wchar_t exePath[MAX_PATH] = { 0 };
|
wchar_t exePath[MAX_PATH] = { 0 };
|
||||||
|
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||||
|
|
||||||
GetModuleFileName(NULL, exePath, sizeof(exePath));
|
GetModuleFileName(NULL, exePath, sizeof(exePath));
|
||||||
|
|
||||||
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
||||||
swprintf_s(commandStr, L"\"%s\" \"%%V\"", exePath);
|
swprintf_s(commandStr, L"\"%s\" \"%%V\"", exePath);
|
||||||
|
|
||||||
|
// Now that we have `commandStr`, it's OK to change `exePath`...
|
||||||
|
PathRemoveFileSpec(exePath);
|
||||||
|
|
||||||
|
PathCombine(icoPath, exePath, L"icons\\cmder.ico");
|
||||||
|
|
||||||
|
// Now set the registry keys
|
||||||
|
|
||||||
|
HKEY root = GetRootKey(opt);
|
||||||
|
|
||||||
|
HKEY cmderKey;
|
||||||
|
FAIL_ON_ERROR(
|
||||||
|
RegCreateKeyEx(root, keyBaseName, 0, NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||||
|
|
||||||
|
FAIL_ON_ERROR(RegSetValue(cmderKey, L"", REG_SZ, L"Cmder Here", NULL));
|
||||||
|
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"NoWorkingDirectory", 0, REG_SZ, (BYTE *)L"", 2));
|
||||||
|
|
||||||
|
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"Icon", 0, REG_SZ, (BYTE *)icoPath, wcslen(icoPath) * sizeof(wchar_t)));
|
||||||
|
|
||||||
|
HKEY command;
|
||||||
|
FAIL_ON_ERROR(
|
||||||
|
RegCreateKeyEx(cmderKey, L"command", 0, NULL,
|
||||||
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &command, NULL));
|
||||||
|
|
||||||
FAIL_ON_ERROR(RegSetValue(command, L"", REG_SZ, commandStr, NULL));
|
FAIL_ON_ERROR(RegSetValue(command, L"", REG_SZ, commandStr, NULL));
|
||||||
|
|
||||||
RegCloseKey(command);
|
RegCloseKey(command);
|
||||||
@ -185,19 +260,17 @@ void RegisterShellMenu(std::wstring opt)
|
|||||||
RegCloseKey(root);
|
RegCloseKey(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnregisterShellMenu(std::wstring opt)
|
void UnregisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||||
{
|
{
|
||||||
HKEY root = GetRootKey(opt);
|
HKEY root = GetRootKey(opt);
|
||||||
HKEY cmderKey;
|
HKEY cmderKey;
|
||||||
FAIL_ON_ERROR(
|
FAIL_ON_ERROR(
|
||||||
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 0, NULL,
|
RegCreateKeyEx(root, keyBaseName, 0, NULL,
|
||||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||||
#ifdef XP
|
#if XP
|
||||||
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
|
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
|
||||||
FAIL_ON_ERROR(SHDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
|
|
||||||
#else
|
#else
|
||||||
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
||||||
FAIL_ON_ERROR(RegDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
|
|
||||||
#endif
|
#endif
|
||||||
RegCloseKey(cmderKey);
|
RegCloseKey(cmderKey);
|
||||||
RegCloseKey(root);
|
RegCloseKey(root);
|
||||||
@ -216,21 +289,27 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
|||||||
|
|
||||||
if (streqi(opt.first.c_str(), L"/START"))
|
if (streqi(opt.first.c_str(), L"/START"))
|
||||||
{
|
{
|
||||||
StartCmder(opt.second);
|
StartCmder(opt.second, false);
|
||||||
|
}
|
||||||
|
else if (streqi(opt.first.c_str(), L"/SINGLE"))
|
||||||
|
{
|
||||||
|
StartCmder(opt.second, true);
|
||||||
}
|
}
|
||||||
else if (streqi(opt.first.c_str(), L"/REGISTER"))
|
else if (streqi(opt.first.c_str(), L"/REGISTER"))
|
||||||
{
|
{
|
||||||
RegisterShellMenu(opt.second);
|
RegisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||||
|
RegisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||||
}
|
}
|
||||||
else if (streqi(opt.first.c_str(), L"/UNREGISTER"))
|
else if (streqi(opt.first.c_str(), L"/UNREGISTER"))
|
||||||
{
|
{
|
||||||
UnregisterShellMenu(opt.second);
|
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||||
|
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n /START <path>\n /REGISTER [USER/ALL]\n /UNREGISTER [USER/ALL]", MB_TITLE, MB_OK);
|
MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n /START <path>\n /SINGLE <path>\n /REGISTER [USER/ALL]\n /UNREGISTER [USER/ALL]", MB_TITLE, MB_OK);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
BIN
msvcp120.dll
BIN
msvcp120.dll
Binary file not shown.
BIN
msvcr120.dll
BIN
msvcr120.dll
Binary file not shown.
40
pack.rb
40
pack.rb
@ -1,40 +0,0 @@
|
|||||||
# Samuel Vasko 2013
|
|
||||||
# Cmder packing script -- Creates zip files for relase
|
|
||||||
|
|
||||||
require "fileutils"
|
|
||||||
|
|
||||||
def create_archive name, exclude
|
|
||||||
if exclude
|
|
||||||
exclude = " -x!cmder\\" + exclude
|
|
||||||
else
|
|
||||||
exclude = ""
|
|
||||||
end
|
|
||||||
system('ls')
|
|
||||||
puts "Running 7z a -x@cmder\\packignore" + exclude + " " + name + " cmder"
|
|
||||||
system("7z a -x@cmder\\packignore" + exclude + " " + name + " cmder")
|
|
||||||
end
|
|
||||||
|
|
||||||
targets = [
|
|
||||||
["cmder.zip"],
|
|
||||||
["cmder.7z"],
|
|
||||||
["cmder_mini.zip", "vendor\\msysgit"]
|
|
||||||
]
|
|
||||||
|
|
||||||
unless system("git describe --abbrev=0 --tags")
|
|
||||||
puts "Failied to get the last tag from git, looks like something is missing"
|
|
||||||
end
|
|
||||||
|
|
||||||
version = `git describe --abbrev=0 --tags`
|
|
||||||
|
|
||||||
FileUtils.touch('Version ' + version.chomp)
|
|
||||||
FileUtils.rm('config/.history') if File.exists?('config/.history')
|
|
||||||
|
|
||||||
Dir.chdir('..')
|
|
||||||
|
|
||||||
targets.each do |ar|
|
|
||||||
create_archive ar[0], ar[1]
|
|
||||||
end
|
|
||||||
|
|
||||||
Dir.chdir('cmder')
|
|
||||||
|
|
||||||
FileUtils.rm('Version ' + version.chomp)
|
|
29
packignore
29
packignore
@ -1,8 +1,21 @@
|
|||||||
cmder\launcher
|
launcher
|
||||||
cmder\icons
|
.gitignore
|
||||||
cmder\.gitignore
|
.gitattributes
|
||||||
cmder\.gitattributes
|
.git
|
||||||
cmder\.git
|
*.rb
|
||||||
cmder\*.rb
|
build
|
||||||
cmder\packignore
|
scripts
|
||||||
cmder\Cmder.bat
|
config\.history
|
||||||
|
packignore
|
||||||
|
icons\Thumbs.db
|
||||||
|
icons\cmder_icon.psd
|
||||||
|
icons\icon_16.png
|
||||||
|
icons\icon_32.png
|
||||||
|
icons\icon_48.png
|
||||||
|
icons\icon_256.png
|
||||||
|
Cmder.bat
|
||||||
|
vendor\tmp
|
||||||
|
appveyor.yml
|
||||||
|
vendor\cmder.sh
|
||||||
|
vendor\git-prompt.sh
|
||||||
|
config\user-*
|
||||||
|
130
scripts/build.ps1
Normal file
130
scripts/build.ps1
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<#
|
||||||
|
.Synopsis
|
||||||
|
Build Cmder
|
||||||
|
.DESCRIPTION
|
||||||
|
Use this script to build your own edition of Cmder
|
||||||
|
|
||||||
|
This script builds dependencies from current vendor/sources.json file and unpacks them.
|
||||||
|
|
||||||
|
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||||
|
Then unblock the script for execution with UnblockFile .\build.ps1
|
||||||
|
.EXAMPLE
|
||||||
|
.\build.ps1
|
||||||
|
|
||||||
|
Executes the default build for Cmder; Conemu, clink. This is equivalent to the "minimum" style package in the releases
|
||||||
|
.EXAMPLE
|
||||||
|
.\build.ps1 -Compile
|
||||||
|
|
||||||
|
Recompile the launcher executable if you have the requisite build tools for C++ installed.
|
||||||
|
.EXAMPLE
|
||||||
|
.\build -verbose
|
||||||
|
|
||||||
|
Execute the build and see what's going on.
|
||||||
|
.EXAMPLE
|
||||||
|
.\build.ps1 -SourcesPath '~/custom/vendors.json'
|
||||||
|
|
||||||
|
Build cmder with your own packages. See vendor/sources.json for the syntax you need to copy.
|
||||||
|
.NOTES
|
||||||
|
AUTHORS
|
||||||
|
Samuel Vasko, Jack Bennett
|
||||||
|
Part of the Cmder project.
|
||||||
|
.LINK
|
||||||
|
http://cmder.net/ - Project Home
|
||||||
|
#>
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||||
|
Param(
|
||||||
|
# CmdletBinding will give us;
|
||||||
|
# -verbose switch to turn on logging and
|
||||||
|
# -whatif switch to not actually make changes
|
||||||
|
|
||||||
|
# Path to the vendor configuration source file
|
||||||
|
[string]$sourcesPath = "..\vendor\sources.json",
|
||||||
|
|
||||||
|
# Vendor folder location
|
||||||
|
[string]$saveTo = "..\vendor\",
|
||||||
|
|
||||||
|
# Launcher folder location
|
||||||
|
[string]$launcher = "..\launcher",
|
||||||
|
|
||||||
|
# Config folder location
|
||||||
|
[string]$config = "..\config",
|
||||||
|
|
||||||
|
# New launcher if you have MSBuild tools installed
|
||||||
|
[switch]$Compile
|
||||||
|
)
|
||||||
|
|
||||||
|
# Dot source util functions into this scope
|
||||||
|
. ".\utils.ps1"
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
Push-Location -Path $saveTo
|
||||||
|
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
||||||
|
|
||||||
|
# Check for requirements
|
||||||
|
Ensure-Exists $sourcesPath
|
||||||
|
Ensure-Executable "7z"
|
||||||
|
New-Item -Type Directory -Path (Join-Path $saveTo "/tmp/") -ErrorAction SilentlyContinue >$null
|
||||||
|
|
||||||
|
# Preserve modified (by user) ConEmu setting file
|
||||||
|
if ($config -ne "") {
|
||||||
|
$ConEmuXml = Join-Path $saveTo "conemu-maximus5\ConEmu.xml"
|
||||||
|
if (Test-Path $ConEmuXml -pathType leaf) {
|
||||||
|
$ConEmuXmlSave = Join-Path $config "ConEmu.xml"
|
||||||
|
Write-Verbose "Backup '$ConEmuXml' to '$ConEmuXmlSave'"
|
||||||
|
Copy-Item $ConEmuXml $ConEmuXmlSave
|
||||||
|
} else { $ConEmuXml = "" }
|
||||||
|
} else { $ConEmuXml = "" }
|
||||||
|
|
||||||
|
$vend = $pwd
|
||||||
|
foreach ($s in $sources) {
|
||||||
|
Write-Verbose "Getting $($s.name) from URL $($s.url)"
|
||||||
|
|
||||||
|
# We do not care about the extensions/type of archive
|
||||||
|
$tempArchive = "tmp/$($s.name).tmp"
|
||||||
|
Delete-Existing $tempArchive
|
||||||
|
Delete-Existing $s.name
|
||||||
|
|
||||||
|
Download-File -Url $s.url -File $vend\$tempArchive -ErrorAction Stop
|
||||||
|
Extract-Archive $tempArchive $s.name
|
||||||
|
|
||||||
|
if ((Get-Childitem $s.name).Count -eq 1) {
|
||||||
|
Flatten-Directory($s.name)
|
||||||
|
}
|
||||||
|
# Write current version to .cmderver file, for later.
|
||||||
|
"$($s.version)" | Out-File "$($s.name)/.cmderver"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Restore user configuration
|
||||||
|
if ($ConEmuXml -ne "") {
|
||||||
|
Write-Verbose "Restore '$ConEmuXmlSave' to '$ConEmuXml'"
|
||||||
|
Copy-Item $ConEmuXmlSave $ConEmuXml
|
||||||
|
}
|
||||||
|
|
||||||
|
Pop-Location
|
||||||
|
|
||||||
|
if($Compile) {
|
||||||
|
Push-Location -Path $launcher
|
||||||
|
msbuild CmderLauncher.vcxproj /p:configuration=Release
|
||||||
|
if ($LastExitCode -ne 0) {
|
||||||
|
throw "msbuild failed to build the executable."
|
||||||
|
}
|
||||||
|
Pop-Location
|
||||||
|
} else {
|
||||||
|
Write-Warning "You are not building a launcher, Use -Compile"
|
||||||
|
Write-Warning "This cannot be a release. Test build only!"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Put vendor\cmder.sh in /etc/profile.d so it runs when we start bash or mintty
|
||||||
|
if ( (Test-Path $($SaveTo + "git-for-windows/etc/profile.d") ) ) {
|
||||||
|
write-verbose "Adding cmder.sh /etc/profile.d"
|
||||||
|
Copy-Item $($SaveTo + "cmder.sh") $($SaveTo + "git-for-windows/etc/profile.d/cmder.sh")
|
||||||
|
}
|
||||||
|
|
||||||
|
# Replace /etc/profile.d/git-prompt.sh with cmder lambda prompt so it runs when we start bash or mintty
|
||||||
|
if ( !(Test-Path $($SaveTo + "git-for-windows/etc/profile.d/git-prompt.sh.bak") ) ) {
|
||||||
|
write-verbose "Replacing /etc/profile.d/git-prompt.sh with our git-prompt.sh"
|
||||||
|
Move-Item $($SaveTo + "git-for-windows/etc/profile.d/git-prompt.sh") $($SaveTo + "git-for-windows/etc/profile.d/git-prompt.sh.bak")
|
||||||
|
Copy-Item $($SaveTo + "git-prompt.sh") $($SaveTo + "git-for-windows/etc/profile.d/git-prompt.sh")
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Verbose "All good and done!"
|
58
scripts/pack.ps1
Normal file
58
scripts/pack.ps1
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<#
|
||||||
|
.Synopsis
|
||||||
|
Pack cmder
|
||||||
|
.DESCRIPTION
|
||||||
|
Use this script to pack cmder into release archives
|
||||||
|
|
||||||
|
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||||
|
Then unblock the script for execution with UnblockFile .\pack.ps1
|
||||||
|
.EXAMPLE
|
||||||
|
.\pack.ps1
|
||||||
|
|
||||||
|
Creates default archives for cmder
|
||||||
|
.EXAMPLE
|
||||||
|
.\build -verbose
|
||||||
|
|
||||||
|
Creates default archives for cmder with plenty of information
|
||||||
|
.NOTES
|
||||||
|
AUTHORS
|
||||||
|
Samuel Vasko, Jack Bennett, Martin Kemp
|
||||||
|
Part of the Cmder project.
|
||||||
|
.LINK
|
||||||
|
https://github.com/cmderdev/cmder - Project Home
|
||||||
|
#>
|
||||||
|
|
||||||
|
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||||
|
Param(
|
||||||
|
# CmdletBinding will give us;
|
||||||
|
# -verbose switch to turn on logging and
|
||||||
|
# -whatif switch to not actually make changes
|
||||||
|
|
||||||
|
# Path to the vendor configuration source file
|
||||||
|
[string]$cmderRoot = "..",
|
||||||
|
|
||||||
|
# Vendor folder locaton
|
||||||
|
[string]$saveTo = "..\build"
|
||||||
|
)
|
||||||
|
|
||||||
|
. "$PSScriptRoot\utils.ps1"
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
Ensure-Executable "7z"
|
||||||
|
|
||||||
|
$targets = @{
|
||||||
|
"cmder.zip" = $null;
|
||||||
|
"cmder.7z" = $null;
|
||||||
|
"cmder_mini.zip" = "-x!`"vendor\git-for-windows`"";
|
||||||
|
}
|
||||||
|
|
||||||
|
Delete-Existing "..\Version*"
|
||||||
|
Delete-Existing "..\build\*"
|
||||||
|
|
||||||
|
$version = Invoke-Expression "git describe --abbrev=0 --tags"
|
||||||
|
(New-Item -ItemType file "$cmderRoot\Version $version") | Out-Null
|
||||||
|
|
||||||
|
foreach ($t in $targets.GetEnumerator()) {
|
||||||
|
Create-Archive $cmderRoot "$saveTo\$($t.Name)" $t.Value
|
||||||
|
$hash = (Digest-MD5 "$saveTo\$($t.Name)")
|
||||||
|
Add-Content "$saveTo\hashes.txt" $hash
|
||||||
|
}
|
104
scripts/utils.ps1
Normal file
104
scripts/utils.ps1
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
function Ensure-Exists ($path) {
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
Write-Error "Missing required $path! Ensure it is installed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
return $true > $null
|
||||||
|
}
|
||||||
|
|
||||||
|
function Ensure-Executable ($command) {
|
||||||
|
try { Get-Command $command -ErrorAction Stop > $null }
|
||||||
|
catch {
|
||||||
|
If( ($command -eq "7z") -and (Test-Path "$env:programfiles\7-zip\7z.exe") ){
|
||||||
|
set-alias -Name "7z" -Value "$env:programfiles\7-zip\7z.exe" -Scope script
|
||||||
|
}
|
||||||
|
ElseIf( ($command -eq "7z") -and (Test-Path "$env:programw6432\7-zip\7z.exe") ) {
|
||||||
|
set-alias -Name "7z" -Value "$env:programw6432\7-zip\7z.exe" -Scope script
|
||||||
|
}
|
||||||
|
Else {
|
||||||
|
Write-Error "Missing $command! Ensure it is installed and on in the PATH"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Delete-Existing ($path) {
|
||||||
|
Write-Verbose "Remove $path"
|
||||||
|
Remove-Item -Recurse -force $path -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
function Extract-Archive ($source, $target) {
|
||||||
|
Invoke-Expression "7z x -y -o$($target) '$source' > `$null"
|
||||||
|
if ($lastexitcode -ne 0) {
|
||||||
|
Write-Error "Extracting of $source failied"
|
||||||
|
}
|
||||||
|
Remove-Item $source
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Archive ($source, $target, $params) {
|
||||||
|
$command = "7z a -x@`"$source\packignore`" $params $target $source > `$null"
|
||||||
|
Write-Verbose "Running: $command"
|
||||||
|
Invoke-Expression $command
|
||||||
|
if ($lastexitcode -ne 0) {
|
||||||
|
Write-Error "Compressing $source failied"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# If directory contains only one child directory
|
||||||
|
# Flatten it instead
|
||||||
|
function Flatten-Directory ($name) {
|
||||||
|
$child = (Get-Childitem $name)[0]
|
||||||
|
Rename-Item $name -NewName "$($name)_moving"
|
||||||
|
Move-Item -Path "$($name)_moving\$child" -Destination $name
|
||||||
|
Remove-Item -Recurse "$($name)_moving"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Digest-MD5 ($path) {
|
||||||
|
if(Get-Command Get-FileHash -ErrorAction SilentlyContinue){
|
||||||
|
return (Get-FileHash -Algorithm MD5 -Path $path).Hash
|
||||||
|
}
|
||||||
|
|
||||||
|
return Invoke-Expression "md5sum $path"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Register-Cmder(){
|
||||||
|
[CmdletBinding()]
|
||||||
|
Param
|
||||||
|
(
|
||||||
|
# Text for the context menu item.
|
||||||
|
$MenuText = "Cmder Here"
|
||||||
|
|
||||||
|
, # Defaults to the current cmder directory when run from cmder.
|
||||||
|
$PathToExe = (Join-Path $env:CMDER_ROOT "cmder.exe")
|
||||||
|
|
||||||
|
, # Commands the context menu will execute.
|
||||||
|
$Command = "%V"
|
||||||
|
|
||||||
|
, # Defaults to the icons folder in the cmder package.
|
||||||
|
$icon = (Split-Path $PathToExe | join-path -ChildPath 'icons/cmder.ico')
|
||||||
|
)
|
||||||
|
Begin
|
||||||
|
{
|
||||||
|
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
|
||||||
|
}
|
||||||
|
Process
|
||||||
|
{
|
||||||
|
New-Item -Path "HKCR:\Directory\Shell\Cmder" -Force -Value $MenuText
|
||||||
|
New-ItemProperty -Path "HKCR:\Directory\Shell\Cmder" -Force -Name "Icon" -Value `"$icon`"
|
||||||
|
New-ItemProperty -Path "HKCR:\Directory\Shell\Cmder" -Force -Name "NoWorkingDirectory"
|
||||||
|
New-Item -Path "HKCR:\Directory\Shell\Cmder\Command" -Force -Value "`"$PathToExe`" `"$Command`" "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Download-File {
|
||||||
|
param (
|
||||||
|
$Url,
|
||||||
|
$File
|
||||||
|
)
|
||||||
|
# I think this is the problem
|
||||||
|
$File = $File -Replace "/", "\"
|
||||||
|
Write-Verbose "Downloading from $Url to $File"
|
||||||
|
$wc = new-object System.Net.WebClient
|
||||||
|
$wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials;
|
||||||
|
$wc.DownloadFile($Url, $File)
|
||||||
|
}
|
8
vendor/aliases.example
vendored
Normal file
8
vendor/aliases.example
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
e.=explorer .
|
||||||
|
gl=git log --oneline --all --graph --decorate $*
|
||||||
|
ls=ls --show-control-chars -F --color $*
|
||||||
|
pwd=cd
|
||||||
|
clear=cls
|
||||||
|
history=cat %CMDER_ROOT%\config\.history
|
||||||
|
unalias=alias /d $1
|
||||||
|
vi=vim $*
|
243
vendor/clink.lua
vendored
Normal file
243
vendor/clink.lua
vendored
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
-- default script for clink, called by init.bat when injecting clink
|
||||||
|
|
||||||
|
-- !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
||||||
|
-- !!! Use "%CMDER_ROOT%\config\<whatever>.lua" to add your lua startup scripts
|
||||||
|
|
||||||
|
|
||||||
|
-- At first, load the original clink.lua file
|
||||||
|
-- this is needed as we set the script path to this dir and therefore the original
|
||||||
|
-- clink.lua is not loaded.
|
||||||
|
local clink_lua_file = clink.get_env('CMDER_ROOT')..'\\vendor\\clink\\clink.lua'
|
||||||
|
dofile(clink_lua_file)
|
||||||
|
|
||||||
|
-- now add our own things...
|
||||||
|
|
||||||
|
function lambda_prompt_filter()
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "λ")
|
||||||
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Resolves closest directory location for specified directory.
|
||||||
|
-- Navigates subsequently up one level and tries to find specified directory
|
||||||
|
-- @param {string} path Path to directory will be checked. If not provided
|
||||||
|
-- current directory will be used
|
||||||
|
-- @param {string} dirname Directory name to search for
|
||||||
|
-- @return {string} Path to specified directory or nil if such dir not found
|
||||||
|
local function get_dir_contains(path, dirname)
|
||||||
|
|
||||||
|
-- return parent path for specified entry (either file or directory)
|
||||||
|
local function pathname(path)
|
||||||
|
local prefix = ""
|
||||||
|
local i = path:find("[\\/:][^\\/:]*$")
|
||||||
|
if i then
|
||||||
|
prefix = path:sub(1, i-1)
|
||||||
|
end
|
||||||
|
return prefix
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Navigates up one level
|
||||||
|
local function up_one_level(path)
|
||||||
|
if path == nil then path = '.' end
|
||||||
|
if path == '.' then path = clink.get_cwd() end
|
||||||
|
return pathname(path)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Checks if provided directory contains git directory
|
||||||
|
local function has_specified_dir(path, specified_dir)
|
||||||
|
if path == nil then path = '.' end
|
||||||
|
local found_dirs = clink.find_dirs(path..'/'..specified_dir)
|
||||||
|
if #found_dirs > 0 then return true end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set default path to current directory
|
||||||
|
if path == nil then path = '.' end
|
||||||
|
|
||||||
|
-- If we're already have .git directory here, then return current path
|
||||||
|
if has_specified_dir(path, dirname) then
|
||||||
|
return path..'/'..dirname
|
||||||
|
else
|
||||||
|
-- Otherwise go up one level and make a recursive call
|
||||||
|
local parent_path = up_one_level(path)
|
||||||
|
if parent_path == path then
|
||||||
|
return nil
|
||||||
|
else
|
||||||
|
return get_dir_contains(parent_path, dirname)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_hg_dir(path)
|
||||||
|
return get_dir_contains(path, '.hg')
|
||||||
|
end
|
||||||
|
|
||||||
|
-- adapted from from clink-completions' git.lua
|
||||||
|
local function get_git_dir(path)
|
||||||
|
|
||||||
|
-- return parent path for specified entry (either file or directory)
|
||||||
|
local function pathname(path)
|
||||||
|
local prefix = ""
|
||||||
|
local i = path:find("[\\/:][^\\/:]*$")
|
||||||
|
if i then
|
||||||
|
prefix = path:sub(1, i-1)
|
||||||
|
end
|
||||||
|
return prefix
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Checks if provided directory contains git directory
|
||||||
|
local function has_git_dir(dir)
|
||||||
|
return #clink.find_dirs(dir..'/.git') > 0 and dir..'/.git'
|
||||||
|
end
|
||||||
|
|
||||||
|
local function has_git_file(dir)
|
||||||
|
local gitfile = io.open(dir..'/.git')
|
||||||
|
if not gitfile then return false end
|
||||||
|
|
||||||
|
local git_dir = gitfile:read():match('gitdir: (.*)')
|
||||||
|
gitfile:close()
|
||||||
|
|
||||||
|
return git_dir and dir..'/'..git_dir
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set default path to current directory
|
||||||
|
if not path or path == '.' then path = clink.get_cwd() end
|
||||||
|
|
||||||
|
-- Calculate parent path now otherwise we won't be
|
||||||
|
-- able to do that inside of logical operator
|
||||||
|
local parent_path = pathname(path)
|
||||||
|
|
||||||
|
return has_git_dir(path)
|
||||||
|
or has_git_file(path)
|
||||||
|
-- Otherwise go up one level and make a recursive call
|
||||||
|
or (parent_path ~= path and get_git_dir(parent_path) or nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Find out current branch
|
||||||
|
-- @return {false|mercurial branch name}
|
||||||
|
---
|
||||||
|
function get_hg_branch()
|
||||||
|
for line in io.popen("hg branch 2>nul"):lines() do
|
||||||
|
local m = line:match("(.+)$")
|
||||||
|
if m then
|
||||||
|
return m
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Get the status of working dir
|
||||||
|
-- @return {bool}
|
||||||
|
---
|
||||||
|
function get_hg_status()
|
||||||
|
for line in io.popen("hg status"):lines() do
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function hg_prompt_filter()
|
||||||
|
|
||||||
|
-- Colors for mercurial status
|
||||||
|
local colors = {
|
||||||
|
clean = "\x1b[1;37;40m",
|
||||||
|
dirty = "\x1b[31;1m",
|
||||||
|
}
|
||||||
|
|
||||||
|
if get_hg_dir() then
|
||||||
|
-- if we're inside of mercurial repo then try to detect current branch
|
||||||
|
local branch = get_hg_branch()
|
||||||
|
if branch then
|
||||||
|
-- Has branch => therefore it is a mercurial folder, now figure out status
|
||||||
|
if get_hg_status() then
|
||||||
|
color = colors.clean
|
||||||
|
else
|
||||||
|
color = colors.dirty
|
||||||
|
end
|
||||||
|
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{hg}", color.."("..branch..")")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- No mercurial present or not in mercurial file
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{hg}", "")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Find out current branch
|
||||||
|
-- @return {nil|git branch name}
|
||||||
|
---
|
||||||
|
function get_git_branch(git_dir)
|
||||||
|
local git_dir = git_dir or get_git_dir()
|
||||||
|
|
||||||
|
-- If git directory not found then we're probably outside of repo
|
||||||
|
-- or something went wrong. The same is when head_file is nil
|
||||||
|
local head_file = git_dir and io.open(git_dir..'/HEAD')
|
||||||
|
if not head_file then return end
|
||||||
|
|
||||||
|
local HEAD = head_file:read()
|
||||||
|
head_file:close()
|
||||||
|
|
||||||
|
-- if HEAD matches branch expression, then we're on named branch
|
||||||
|
-- otherwise it is a detached commit
|
||||||
|
local branch_name = HEAD:match('ref: refs/heads/(.+)')
|
||||||
|
return branch_name or 'HEAD detached at '..HEAD:sub(1, 7)
|
||||||
|
end
|
||||||
|
|
||||||
|
---
|
||||||
|
-- Get the status of working dir
|
||||||
|
-- @return {bool}
|
||||||
|
---
|
||||||
|
function get_git_status()
|
||||||
|
return io.popen("git diff --quiet --ignore-submodules HEAD 2>nul")
|
||||||
|
end
|
||||||
|
|
||||||
|
function git_prompt_filter()
|
||||||
|
|
||||||
|
-- Colors for git status
|
||||||
|
local colors = {
|
||||||
|
clean = "\x1b[1;37;40m",
|
||||||
|
dirty = "\x1b[31;1m",
|
||||||
|
}
|
||||||
|
|
||||||
|
local git_dir = get_git_dir()
|
||||||
|
if git_dir then
|
||||||
|
-- if we're inside of git repo then try to detect current branch
|
||||||
|
local branch = get_git_branch(git_dir)
|
||||||
|
if branch then
|
||||||
|
-- Has branch => therefore it is a git folder, now figure out status
|
||||||
|
if get_git_status() then
|
||||||
|
color = colors.clean
|
||||||
|
else
|
||||||
|
color = colors.dirty
|
||||||
|
end
|
||||||
|
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..branch..")")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- No git present or not in git file
|
||||||
|
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", "")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
clink.prompt.register_filter(lambda_prompt_filter, 40)
|
||||||
|
clink.prompt.register_filter(hg_prompt_filter, 50)
|
||||||
|
clink.prompt.register_filter(git_prompt_filter, 50)
|
||||||
|
|
||||||
|
local completions_dir = clink.get_env('CMDER_ROOT')..'/vendor/clink-completions/'
|
||||||
|
for _,lua_module in ipairs(clink.find_files(completions_dir..'*.lua')) do
|
||||||
|
-- Skip files that starts with _. This could be useful if some files should be ignored
|
||||||
|
if not string.match(lua_module, '^_.*') then
|
||||||
|
local filename = completions_dir..lua_module
|
||||||
|
-- use dofile instead of require because require caches loaded modules
|
||||||
|
-- so config reloading using Alt-Q won't reload updated modules.
|
||||||
|
dofile(filename)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
73
vendor/cmder.sh
vendored
Normal file
73
vendor/cmder.sh
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# DO NOT EDIT THIS FILE IT WILL BE OVERWRITTEN ON UPDATE
|
||||||
|
#
|
||||||
|
# Add portable user customizations ${CMDER_ROOT}/config/user-profile.sh,
|
||||||
|
# these customizations will follow Cmder if $CMDER_ROOT is copied
|
||||||
|
# to another machine.
|
||||||
|
#
|
||||||
|
# Add system specific users customizations to $HOME/.bashrc, these
|
||||||
|
# customizations will not follow Cmder to another machine.
|
||||||
|
|
||||||
|
# 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
|
||||||
|
PATH=${GIT_INSTALL_ROOT}/bin:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
PATH=${CMDER_ROOT}/bin:$PATH:${CMDER_ROOT}
|
||||||
|
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# Drop *.sh or *.zsh files into "${CMDER_ROOT}\config\profile.d"
|
||||||
|
# to source them at startup.
|
||||||
|
if [ ! -d "${CMDER_ROOT}/config/profile.d" ] ; then
|
||||||
|
mkdir -p ${CMDER_ROOT}/config/profile.d
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "${CMDER_ROOT}/config/profile.d" ] ; then
|
||||||
|
unset profile_d_scripts
|
||||||
|
pushd ${CMDER_ROOT}/config/profile.d >/dev/null
|
||||||
|
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.sh 2>/dev/null)
|
||||||
|
|
||||||
|
if [ ! "x${profile_d_scripts}" = "x" ] ; then
|
||||||
|
for x in ${profile_d_scripts} ; do
|
||||||
|
# echo Sourcing "${x}"...
|
||||||
|
. $x
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
popd >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ${CMDER_ROOT}/config/user-profile.sh ] ; then
|
||||||
|
. ${CMDER_ROOT}/config/user-profile.sh
|
||||||
|
else
|
||||||
|
echo Creating user startup file: "${CMDER_ROOT}/config/user-profile.sh"
|
||||||
|
cat <<-eof >"${CMDER_ROOT}/config/user-profile.sh"
|
||||||
|
# use this file to run your own startup commands for msys2 bash'
|
||||||
|
|
||||||
|
# To add a new vendor to the path, do something like:
|
||||||
|
# export PATH=\${CMDER_ROOT}/vendor/whatever:\${PATH}
|
||||||
|
eof
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source the users .bashrc file if it exists
|
||||||
|
if [ -f "${HOME}/.bashrc" ] ; then
|
||||||
|
. "${HOME}/.bashrc"
|
||||||
|
fi
|
86
vendor/cmder_exinit
vendored
Normal file
86
vendor/cmder_exinit
vendored
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
# 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
|
||||||
|
# folder when launched.
|
||||||
|
#
|
||||||
|
# The destination file extension depends on the shell you use. For example:
|
||||||
|
#
|
||||||
|
# bash - Copy to /etc/profile.d/cmder_exinit.sh
|
||||||
|
# zsh - Copy to /etc/profile.d/cmder_exinit.zsh
|
||||||
|
# Add portable user customizations ${CMDER_ROOT}/config/user-profile.sh or
|
||||||
|
# add whole config scripts to ${CMDER_ROOT}/config/profile.d both will be sourced
|
||||||
|
# from mthis file and be appied to the environment at startup.
|
||||||
|
#
|
||||||
|
# These customizations will follow Cmder if $CMDER_ROOT is copied
|
||||||
|
# to another machine.
|
||||||
|
#
|
||||||
|
# Add system specific users customizations to $HOME/.bashrc, these
|
||||||
|
# customizations will not follow Cmder to another machine.
|
||||||
|
|
||||||
|
# # Uncomment and edit the CMDER_ROOT line to use Cmder/config even when launched
|
||||||
|
# # from outside Cmder.
|
||||||
|
# CMDER_ROOT=${USERPROFILE}/cmder # This is not required if launched from Cmder.
|
||||||
|
|
||||||
|
# Check that we haven't already been sourced.
|
||||||
|
[[ -z ${CMDER_EXINIT} ]] && CMDER_EXINIT="1" || return
|
||||||
|
|
||||||
|
# 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
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
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:$PATH:${CMDER_ROOT}
|
||||||
|
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# Drop *.sh or *.zsh files into "${CMDER_ROOT}\config\profile.d"
|
||||||
|
# to source them at startup.
|
||||||
|
if [ ! -d "${CMDER_ROOT}/config/profile.d" ] ; then
|
||||||
|
mkdir -p ${CMDER_ROOT}/config/profile.d
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "${CMDER_ROOT}/config/profile.d" ] ; then
|
||||||
|
unset profile_d_scripts
|
||||||
|
pushd ${CMDER_ROOT}/config/profile.d >/dev/null
|
||||||
|
if [ ! "x${ZSH_VERSION}" = "x" ]; then
|
||||||
|
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.zsh 2>/dev/null)
|
||||||
|
elif [ ! "x${BASH_VERSION}" = "x" ]; then
|
||||||
|
profile_d_scripts=$(ls ${CMDER_ROOT}/config/profile.d/*.sh 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! "x${profile_d_scripts}" = "x" ] ; then
|
||||||
|
for x in ${profile_d_scripts} ; do
|
||||||
|
# echo Sourcing "${x}"...
|
||||||
|
. $x
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
popd >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f ${CMDER_ROOT}/config/user-profile.sh ] ; then
|
||||||
|
. ${CMDER_ROOT}/config/user-profile.sh
|
||||||
|
else
|
||||||
|
echo Creating user startup file: "${CMDER_ROOT}/config/user-profile.sh"
|
||||||
|
cat <<-eof >"${CMDER_ROOT}/config/user-profile.sh"
|
||||||
|
# use this file to run your own startup commands for msys2 bash'
|
||||||
|
|
||||||
|
# To add a new vendor to the path, do something like:
|
||||||
|
# export PATH=\${CMDER_ROOT}/vendor/whatever:\${PATH}
|
||||||
|
eof
|
||||||
|
fi
|
||||||
|
fi
|
22
vendor/git-prompt.sh
vendored
Normal file
22
vendor/git-prompt.sh
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]' # set window title
|
||||||
|
PS1="$PS1"'\[\033[32m\]' # change to green
|
||||||
|
PS1="$PS1"'\u@\h ' # user@host<space>
|
||||||
|
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow
|
||||||
|
PS1="$PS1"'\w' # current working directory
|
||||||
|
if test -z "$WINELOADERNOEXEC"
|
||||||
|
then
|
||||||
|
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
|
||||||
|
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}"
|
||||||
|
COMPLETION_PATH="${COMPLETION_PATH%/lib/git-core}"
|
||||||
|
COMPLETION_PATH="$COMPLETION_PATH/share/git/completion"
|
||||||
|
if test -f "$COMPLETION_PATH/git-prompt.sh"
|
||||||
|
then
|
||||||
|
. "$COMPLETION_PATH/git-completion.bash"
|
||||||
|
. "$COMPLETION_PATH/git-prompt.sh"
|
||||||
|
PS1="$PS1"'\[\033[36m\]' # change color to cyan
|
||||||
|
PS1="$PS1"'`__git_ps1`' # bash function
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
PS1="$PS1"'\[\033[0m\]' # change color
|
||||||
|
PS1="$PS1"'\n' # new line
|
||||||
|
PS1="$PS1"'λ ' # prompt: always λ
|
109
vendor/init.bat
vendored
109
vendor/init.bat
vendored
@ -1,35 +1,118 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
:: Init Script for cmd.exe
|
:: Init Script for cmd.exe
|
||||||
:: Sets some nice defaults
|
|
||||||
:: Created as part of cmder project
|
:: Created as part of cmder project
|
||||||
|
|
||||||
|
:: !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
||||||
|
:: !!! Use "%CMDER_ROOT%\config\user-profile.cmd" to add your own startup commands
|
||||||
|
|
||||||
|
:: Find root dir
|
||||||
|
if not defined CMDER_ROOT (
|
||||||
|
for /f "delims=" %%i in ("%ConEmuDir%\..\..") do set CMDER_ROOT=%%~fi
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Remove trailing '\'
|
||||||
|
if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
|
||||||
|
|
||||||
:: Change the prompt style
|
:: Change the prompt style
|
||||||
:: Mmm tasty lamb
|
:: Mmm tasty lamb
|
||||||
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40m{lamb}$S$E[0m
|
prompt $E[1;32;40m$P$S{git}{hg}$S$_$E[1;30;40m{lamb}$S$E[0m
|
||||||
|
|
||||||
:: Pick right version of clink
|
:: Pick right version of clink
|
||||||
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||||
set architecture=86
|
set architecture=86
|
||||||
) else (
|
) else (
|
||||||
set architecture=64
|
set architecture=64
|
||||||
)
|
)
|
||||||
|
|
||||||
:: Run clink
|
:: Tell the user about the clink config files...
|
||||||
@"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config"
|
if not exist "%CMDER_ROOT%\config\settings" (
|
||||||
|
echo Generating clink initial settings in %CMDER_ROOT%\config\settings
|
||||||
|
echo Additional *.lua files in %CMDER_ROOT%\config are loaded on startup.
|
||||||
|
)
|
||||||
|
|
||||||
:: Prepare for msysgit
|
:: Run clink
|
||||||
|
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"
|
||||||
|
|
||||||
|
:: Prepare for git-for-windows
|
||||||
|
|
||||||
:: I do not even know, copypasted from their .bat
|
:: I do not even know, copypasted from their .bat
|
||||||
@set PLINK_PROTOCOL=ssh
|
set PLINK_PROTOCOL=ssh
|
||||||
@if not defined TERM set TERM=cygwin
|
if not defined TERM set TERM=cygwin
|
||||||
|
|
||||||
|
:: Check if msysgit is installed
|
||||||
|
if exist "%ProgramFiles%\Git" (
|
||||||
|
set "GIT_INSTALL_ROOT=%ProgramFiles%\Git"
|
||||||
|
) else if exist "%ProgramFiles(x86)%\Git" (
|
||||||
|
set "GIT_INSTALL_ROOT=%ProgramFiles(x86)%\Git"
|
||||||
|
) else if exist "%USERPROFILE%\AppData\Local\Programs\Git" (
|
||||||
|
set "GIT_INSTALL_ROOT=%USERPROFILE%\AppData\Local\Programs\Git"
|
||||||
|
) else if exist "%CMDER_ROOT%\vendor\git-for-windows" (
|
||||||
|
set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Add git to the path
|
||||||
|
if defined GIT_INSTALL_ROOT (
|
||||||
|
set "PATH=%GIT_INSTALL_ROOT%\bin;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74;%PATH%"
|
||||||
|
:: define SVN_SSH so we can use git svn with ssh svn repositories
|
||||||
|
if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
|
||||||
|
)
|
||||||
|
|
||||||
:: Enhance Path
|
:: Enhance Path
|
||||||
@set git_install_root=%CMDER_ROOT%\vendor\msysgit
|
set "PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\"
|
||||||
@set PATH=%CMDER_ROOT%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim73;%PATH%
|
|
||||||
|
:: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d"
|
||||||
|
:: to run them at startup.
|
||||||
|
if not exist "%CMDER_ROOT%\config\profile.d" (
|
||||||
|
mkdir "%CMDER_ROOT%\config\profile.d"
|
||||||
|
)
|
||||||
|
|
||||||
|
pushd "%CMDER_ROOT%\config\profile.d"
|
||||||
|
for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do (
|
||||||
|
REM echo Calling %CMDER_ROOT%\config\profile.d\%%x...
|
||||||
|
call "%CMDER_ROOT%\config\profile.d\%%x"
|
||||||
|
)
|
||||||
|
popd
|
||||||
|
|
||||||
|
:: make sure we have an example file
|
||||||
|
if not exist "%CMDER_ROOT%\config\aliases" (
|
||||||
|
echo Creating intial aliases in %CMDER_ROOT%\config\aliases
|
||||||
|
copy "%CMDER_ROOT%\vendor\aliases.example" "%CMDER_ROOT%\config\aliases" > null
|
||||||
|
)
|
||||||
|
|
||||||
:: Add aliases
|
:: Add aliases
|
||||||
@doskey /macrofile="%CMDER_ROOT%\config\aliases"
|
doskey /macrofile="%CMDER_ROOT%\config\aliases"
|
||||||
|
|
||||||
|
:: See vendor\git-for-windows\README.portable for why we do this
|
||||||
|
:: Basically we need to execute this post-install.bat because we are
|
||||||
|
:: manually extracting the archive rather than executing the 7z sfx
|
||||||
|
if exist "%CMDER_ROOT%\vendor\git-for-windows\post-install.bat" (
|
||||||
|
echo Running Git for Windows one time Post Install....
|
||||||
|
cd /d "%CMDER_ROOT%\vendor\git-for-windows\"
|
||||||
|
"%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe" --no-needs-console --hide --no-cd --command=post-install.bat
|
||||||
|
cd /d %USERPROFILE%
|
||||||
|
)
|
||||||
|
|
||||||
:: Set home path
|
:: Set home path
|
||||||
@set HOME=%USERPROFILE%
|
if not defined HOME set HOME=%USERPROFILE%
|
||||||
|
|
||||||
@if defined CMDER_START cd /d "%CMDER_START%"
|
:: This is either a env variable set by the user or the result of
|
||||||
|
:: cmder.exe setting this variable due to a commandline argument or a "cmder here"
|
||||||
|
if defined CMDER_START (
|
||||||
|
cd /d "%CMDER_START%"
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%CMDER_ROOT%\config\user-profile.cmd" (
|
||||||
|
rem create this file and place your own command in there
|
||||||
|
call "%CMDER_ROOT%\config\user-profile.cmd"
|
||||||
|
) else (
|
||||||
|
echo Creating user startup file: "%CMDER_ROOT%\config\user-profile.cmd"
|
||||||
|
(
|
||||||
|
echo :: use this file to run your own startup commands
|
||||||
|
echo :: use in front of the command to prevent printing the command
|
||||||
|
echo.
|
||||||
|
echo :: call "%%GIT_INSTALL_ROOT%%/cmd/start-ssh-agent.cmd
|
||||||
|
echo :: set PATH=%%CMDER_ROOT%%\vendor\whatever;%%PATH%%
|
||||||
|
echo.
|
||||||
|
) > "%CMDER_ROOT%\config\user-profile.cmd"
|
||||||
|
)
|
||||||
|
118
vendor/profile.ps1
vendored
Normal file
118
vendor/profile.ps1
vendored
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
# Init Script for PowerShell
|
||||||
|
# Created as part of cmder project
|
||||||
|
|
||||||
|
# !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
|
||||||
|
# !!! Use "%CMDER_ROOT%\config\user-profile.ps1" to add your own startup commands
|
||||||
|
|
||||||
|
# We do this for Powershell as Admin Sessions because CMDER_ROOT is not beng set.
|
||||||
|
if (! $ENV:CMDER_ROOT ) {
|
||||||
|
$ENV:CMDER_ROOT = resolve-path( $ENV:ConEmuDir + "\..\.." )
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove trailing '\'
|
||||||
|
$ENV:CMDER_ROOT = (($ENV:CMDER_ROOT).trimend("\"))
|
||||||
|
|
||||||
|
# Compatibility with PS major versions <= 2
|
||||||
|
if(!$PSScriptRoot) {
|
||||||
|
$PSScriptRoot = Split-Path $Script:MyInvocation.MyCommand.Path
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add Cmder modules directory to the autoload path.
|
||||||
|
$CmderModulePath = Join-path $PSScriptRoot "psmodules/"
|
||||||
|
|
||||||
|
if( -not $env:PSModulePath.Contains($CmderModulePath) ){
|
||||||
|
$env:PSModulePath = $env:PSModulePath.Insert(0, "$CmderModulePath;")
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Get-command -Name "vim" -ErrorAction Stop >$null
|
||||||
|
} catch {
|
||||||
|
# # You could do this but it may be a little drastic and introduce a lot of
|
||||||
|
# # unix tool overlap with powershel unix like aliases
|
||||||
|
# $env:Path += $(";" + $env:CMDER_ROOT + "\vendor\git-for-windows\usr\bin")
|
||||||
|
# set-alias -name "vi" -value "vim"
|
||||||
|
# # I think the below is safer.
|
||||||
|
|
||||||
|
new-alias -name "vim" -value $($ENV:CMDER_ROOT + "\vendor\git-for-windows\usr\bin\vim.exe")
|
||||||
|
new-alias -name "vi" -value vim
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
# Check if git is on PATH, i.e. Git already installed on system
|
||||||
|
Get-command -Name "git" -ErrorAction Stop >$null
|
||||||
|
} catch {
|
||||||
|
$env:Path += $(";" + $env:CMDER_ROOT + "\vendor\git-for-windows\bin")
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
Import-Module -Name "posh-git" -ErrorAction Stop >$null
|
||||||
|
$gitStatus = $true
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Missing git support, install posh-git with 'Install-Module posh-git' and restart cmder."
|
||||||
|
$gitStatus = $false
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkGit($Path) {
|
||||||
|
if (Test-Path -Path (Join-Path $Path '.git') ) {
|
||||||
|
Write-VcsStatus
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$SplitPath = split-path $path
|
||||||
|
if ($SplitPath) {
|
||||||
|
checkGit($SplitPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set up a Cmder prompt, adding the git prompt parts inside git repos
|
||||||
|
function global:prompt {
|
||||||
|
$realLASTEXITCODE = $LASTEXITCODE
|
||||||
|
$Host.UI.RawUI.ForegroundColor = "White"
|
||||||
|
Write-Host $pwd.ProviderPath -NoNewLine -ForegroundColor Green
|
||||||
|
if($gitStatus){
|
||||||
|
checkGit($pwd.ProviderPath)
|
||||||
|
}
|
||||||
|
$global:LASTEXITCODE = $realLASTEXITCODE
|
||||||
|
Write-Host "`nλ" -NoNewLine -ForegroundColor "DarkGray"
|
||||||
|
return " "
|
||||||
|
}
|
||||||
|
|
||||||
|
# Load special features come from posh-git
|
||||||
|
if ($gitStatus) {
|
||||||
|
Start-SshAgent -Quiet
|
||||||
|
}
|
||||||
|
|
||||||
|
# Move to the wanted location
|
||||||
|
# This is either a env variable set by the user or the result of
|
||||||
|
# cmder.exe setting this variable due to a commandline argument or a "cmder here"
|
||||||
|
if ( $ENV:CMDER_START ) {
|
||||||
|
Set-Location -Path "$ENV:CMDER_START"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Get-Module PSReadline -ErrorAction "SilentlyContinue") {
|
||||||
|
Set-PSReadlineOption -ExtraPromptLineCount 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Enhance Path
|
||||||
|
$env:Path = "$Env:CMDER_ROOT\bin;$env:Path;$Env:CMDER_ROOT"
|
||||||
|
|
||||||
|
# Drop *.ps1 files into "$ENV:CMDER_ROOT\config\profile.d"
|
||||||
|
# to source them at startup.
|
||||||
|
if (-not (test-path "$ENV:CMDER_ROOT\config\profile.d")) {
|
||||||
|
mkdir "$ENV:CMDER_ROOT\config\profile.d"
|
||||||
|
}
|
||||||
|
|
||||||
|
pushd $ENV:CMDER_ROOT\config\profile.d
|
||||||
|
foreach ($x in ls *.ps1) {
|
||||||
|
# write-host write-host Sourcing $x
|
||||||
|
. $x
|
||||||
|
}
|
||||||
|
popd
|
||||||
|
|
||||||
|
$CmderUserProfilePath = Join-Path $env:CMDER_ROOT "config\user-profile.ps1"
|
||||||
|
if(Test-Path $CmderUserProfilePath) {
|
||||||
|
# Create this file and place your own command in there.
|
||||||
|
. "$CmderUserProfilePath"
|
||||||
|
} else {
|
||||||
|
Write-Host "Creating user startup file: $CmderUserProfilePath"
|
||||||
|
"# Use this file to run your own startup commands" | Out-File $CmderUserProfilePath
|
||||||
|
}
|
2132
vendor/psmodules/PsGet/PsGet.psm1
vendored
Normal file
2132
vendor/psmodules/PsGet/PsGet.psm1
vendored
Normal file
File diff suppressed because it is too large
Load Diff
22
vendor/sources.json
vendored
Normal file
22
vendor/sources.json
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "git-for-windows",
|
||||||
|
"version": "v2.7.4.windows.1",
|
||||||
|
"url": "https://github.com/git-for-windows/git/releases/download/v2.7.4.windows.1/PortableGit-2.7.4-32-bit.7z.exe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clink",
|
||||||
|
"version": "0.4.7",
|
||||||
|
"url": "https://github.com/mridgers/clink/releases/download/0.4.7/clink_0.4.7.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "conemu-maximus5",
|
||||||
|
"version": "160207",
|
||||||
|
"url": "https://github.com/Maximus5/ConEmu/releases/download/v16.02.07/ConEmuPack.160207.7z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clink-completions",
|
||||||
|
"version": "0.2.2",
|
||||||
|
"url": "https://github.com/vladimir-kotikov/clink-completions/archive/0.2.2.zip"
|
||||||
|
}
|
||||||
|
]
|
Reference in New Issue
Block a user