Compare commits

..

42 Commits

Author SHA1 Message Date
ee50cc5e7c Whops, fixed the start dir 2013-11-29 16:21:07 +01:00
f7d1dfa2b7 Added icon 2013-11-29 14:09:46 +01:00
12d21de1c3 Changed shortcut for new console to LShift + alt + #, Closing #9 and #17 2013-11-29 12:20:59 +01:00
a231fd9f60 Unecessary whitespace removed + pwd alias added 2013-11-29 12:15:31 +01:00
9d5d3e1556 Allow to run cmd task from custom location. 2013-11-29 12:09:20 +01:00
d95f25207d Merge pull request #51 from MartiUK/patch-1
Allow use of Vim from msysgit.
2013-11-28 10:40:48 -08:00
f3d93c0f99 Allow use of Vim from msysgit.
Added vim location to PATH setup in init.bat.
2013-11-28 16:32:37 +00:00
47b725bf0f Merge pull request #34 from schlamar/gitattributes
Fix line ending handling if autocrlf is false.
2013-11-28 03:49:46 -08:00
6ae803987b Merge pull request #32 from Shoozza/patch-4
Fix spelling in init.bat
2013-11-27 14:54:32 -08:00
027be08286 Merge pull request #26 from Vivix/master
Added minimal validation and usage help.
2013-11-27 10:49:43 -08:00
42bad3e509 Merge pull request #22 from Shoozza/patch-1
Fix spelling
2013-11-27 08:53:17 -08:00
2ac148ce22 Merge pull request #18 from tonylau/patch-1
Fixed grammar
2013-11-27 08:48:11 -08:00
55aef09412 Fix line ending handling if autocrlf is false. 2013-11-27 10:20:34 +01:00
0bde8b361a Fix spelling in init.bat 2013-11-27 10:11:29 +01:00
f9c6d61ee0 Added minimal validation and usage help. 2013-11-27 04:36:48 +01:00
bbcbd2ece9 Fix spelling 2013-11-27 01:44:04 +01:00
6f6d9f29ec Fixed grammar 2013-11-26 19:50:59 +00:00
4d926e0836 Merge pull request #15 from jyggen/patch-1
Fixed issue when rootDir contains spaces.
2013-11-22 03:15:46 -08:00
75cb46392e Fixed issue when rootDir contains spaces. 2013-11-22 11:11:04 +01:00
471e341a97 Now with icons! 2013-11-15 17:06:46 +01:00
c2b37021d4 Now with git in prompt (fix for #13) 2013-11-15 17:06:15 +01:00
3fefa9698e Ignore exe 2013-11-15 17:05:17 +01:00
14799b307d Restored to batch file. Now compiled in distributed package 2013-11-15 17:04:38 +01:00
4c4930704f Fix for #1 #11 handling of C:\Users\Samuel directory 2013-11-13 14:34:19 +01:00
42d22f1e17 Removed home declaration 2013-11-03 18:04:36 +01:00
2d0a7093d4 Changed to LCtrl in tab opening 2013-11-03 18:00:18 +01:00
f8b96665a8 Added Thumbs file 2013-11-03 17:55:48 +01:00
049e54dfe0 Merge branch 'master' of https://github.com/bliker/cmder 2013-10-12 13:25:08 +02:00
dc0cc7350b New link from Maximus5 2013-10-12 13:24:51 +02:00
8489977575 Merge pull request #5 from BeingTomGreen/patch-1
minor typo fix
2013-10-08 10:20:38 -07:00
ee898d9d28 minor typo fix 2013-10-08 11:29:35 +01:00
a516858048 Nicer intro 2013-09-28 20:53:19 +02:00
4dc1065399 Forgot the prefix echo with @ 2013-09-28 20:43:09 +02:00
eaa78c6bf3 created new build script, and accomodated to new file names 2013-09-28 20:38:52 +02:00
2521097f72 New fixed alias 2013-09-27 14:27:02 +02:00
3704ff3e2e At a second glance, I do not like it 2013-09-25 21:08:58 +02:00
c2c0e1c3aa wrong slash 2013-09-07 17:56:00 +02:00
ec5f8f9808 Git initiation 2013-09-07 17:52:50 +02:00
aefb0f2709 Ignoring the .history file 2013-09-07 17:52:20 +02:00
2cceaaef23 Icon 2013-09-07 17:40:11 +02:00
2c0a6d095f Changes for startup 2013-09-07 17:39:24 +02:00
e38aded028 meh 2013-07-16 19:26:12 +02:00
19 changed files with 229 additions and 35 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

3
.gitignore vendored
View File

@ -4,3 +4,6 @@
vendor/*
!vendor/*.md
!vendor/*.bat
config/.history
Thumbs.db
*.exe

View File

@ -1,2 +1,3 @@
@echo off
start vendor/ConEmu/ConEmu.exe /Title Cmder /LoadCfgFile ../../config/ConEmu.xml
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"

View File

@ -8,7 +8,7 @@ Cmder is a **software package** created out of pure frustration over absence of
## Why use it
The main advantage of Cmder is portablibity. It is designed to be totally self-container. With no external dependencies. That makes is great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies. That makes is great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
## Installation

View File

@ -1,3 +1,3 @@
## Bin
Thif folder will be injected into path at runtime
This folder will be injected into path at runtime

View File

@ -1,4 +1,28 @@
@echo off
if ["%1"] == ["/?"] goto:p_help
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
::validate alias
setlocal
for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G
set _temp=%_temp2: =%
if not ["%_temp%"] == ["%_temp2%"] (
echo Your alias name can not contain a space
endlocal
goto:eof
)
echo %* >> %~dp0..\config\aliases
doskey /macrofile=%~dp0..\config\aliases
echo Alias created
endlocal
goto:eof
:p_help
echo.Usage:
echo. alias name=full 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. $T is the command seperator, allowing you to string several commands together into one alias.
echo. For more information, read DOSKEY/?

70
build_cmder.rb Normal file
View File

@ -0,0 +1,70 @@
# 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'
def get_file project, query
# Should be changed to integrated downloader
urlToFile = 'wget -q -O - "http://samuelvasko.tk/gcode/?project='+project+'&query='+query+'"'
urlToFile = `#{urlToFile}`
urlToFile = urlToFile.split("\n").first
extension = urlToFile.split('.').last
filename = project+'.'+extension
puts "\n ------ Downloading #{project} ------- \n \n"
get_file = system("wget -O #{filename} #{urlToFile}")
unless get_file
puts "Failied to download #{project} from #{urlToFile}"
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
puts '
______ _ _ _ _ _
| ___ \ (_) | | (_) | |
| |_/ /_ _ _| | __| |_ _ __ __ _ ___ _ __ ___ __| | ___ _ __
| ___ \ | | | | |/ _` | | \'_ \ / _` | / __| \'_ ` _ \ / _` |/ _ \ \'__|
| |_/ / |_| | | | (_| | | | | | (_| | | (__| | | | | | (_| | __/ |
\____/ \__,_|_|_|\__,_|_|_| |_|\__, | \___|_| |_| |_|\__,_|\___|_|
__/ |
|___/
'
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 'Done, bye'

View File

@ -1 +0,0 @@

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2013-07-16 16:32:45">
<key name=".Vanilla" modified="2013-11-29 16:19:40" build="131107">
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
@ -125,10 +125,10 @@
<value name="UseCurrentSizePos" type="hex" data="01"/>
<value name="WindowMode" type="dword" data="0000051f"/>
<value name="ConWnd Width" type="dword" data="0000006f"/>
<value name="ConWnd Height" type="dword" data="00000026"/>
<value name="ConWnd Height" type="dword" data="0000001a"/>
<value name="Cascaded" type="hex" data="01"/>
<value name="ConWnd X" type="dword" data="00000108"/>
<value name="ConWnd Y" type="dword" data="000000c1"/>
<value name="ConWnd X" type="dword" data="000000bc"/>
<value name="ConWnd Y" type="dword" data="00000065"/>
<value name="16bit Height" type="dword" data="00000000"/>
<value name="AutoSaveSizePos" type="hex" data="00"/>
<value name="IntegralSize" type="hex" data="00"/>
@ -249,7 +249,7 @@
<value name="StatusBar.Hide.Proc" type="hex" data="00"/>
<value name="StatusBar.Hide.Title" type="hex" data="01"/>
<value name="StatusBar.Hide.Resize" type="hex" data="00"/>
<value name="Tabs" type="hex" data="02"/>
<value name="Tabs" type="hex" data="01"/>
<value name="TabsLocation" type="hex" data="01"/>
<value name="TabSelf" type="hex" data="01"/>
<value name="TabLazy" type="hex" data="01"/>
@ -329,7 +329,7 @@
<value name="Update.CheckOnStartup" type="hex" data="01"/>
<value name="Update.CheckHourly" type="hex" data="00"/>
<value name="Update.ConfirmDownload" type="hex" data="01"/>
<value name="Update.UseBuilds" type="hex" data="02"/>
<value name="Update.UseBuilds" type="hex" data="01"/>
<value name="Update.UseProxy" type="hex" data="00"/>
<value name="Update.Proxy" type="string" data=""/>
<value name="Update.ProxyUser" type="string" data=""/>
@ -411,9 +411,9 @@
<value name="Key.JumpNextMonitor" type="dword" data="80808000"/>
<value name="Key.TileToLeft" type="dword" data="80808000"/>
<value name="Key.TileToRIght" type="dword" data="80808000"/>
<value name="KeyMacro01" type="dword" data="00121131"/>
<value name="KeyMacro01" type="dword" data="0012a031"/>
<value name="KeyMacro01.Text" type="string" data="Task(&quot;cmd&quot;)"/>
<value name="KeyMacro02" type="dword" data="00121132"/>
<value name="KeyMacro02" type="dword" data="0012a032"/>
<value name="KeyMacro02.Text" type="string" data="Task(&quot;PowerShell&quot;)"/>
<value name="KeyMacro03" type="dword" data="00000000"/>
<value name="KeyMacro03.Text" type="string" data=""/>
@ -483,28 +483,30 @@
<value name="DndLKey" type="hex" data="00"/>
<value name="DndRKey" type="hex" data="a2"/>
<value name="WndDragKey" type="dword" data="00121101"/>
<key name="Tasks" modified="2013-07-16 16:32:45">
<key name="Tasks" modified="2013-11-29 16:19:41" build="131107">
<value name="Count" type="dword" data="00000002"/>
<key name="Task1" modified="2013-07-16 16:32:45">
<key name="Task1" modified="2013-11-29 16:19:41" build="131107">
<value name="Name" type="string" data="{cmd}"/>
<value name="GuiArgs" type="string" data=" /icon &quot;cmd.exe&quot;"/>
<value name="Cmd1" type="string" data="cmd /k vendor\init.bat"/>
<value name="Cmd1" type="string" data="cmd /k %CMDER_ROOT%\vendor\init.bat -new_console:d:%USERPROFILE%"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
<value name="Hotkey" type="dword" data="00000000"/>
</key>
<key name="Task2" modified="2013-07-16 16:32:45">
<key name="Task2" modified="2013-11-29 16:19:41" build="131107">
<value name="Name" type="string" data="{PowerShell}"/>
<value name="GuiArgs" type="string" data="/dir &quot;%userprofile%&quot;"/>
<value name="Cmd1" type="string" data="powershell"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
<value name="Hotkey" type="dword" data="00000000"/>
</key>
</key>
<key name="Apps" modified="2013-07-16 16:32:45">
<key name="Apps" modified="2013-11-29 16:19:41" build="131107">
<value name="Count" type="dword" data="00000000"/>
</key>
<key name="Colors" modified="2013-07-16 16:32:45">
<key name="Palette1" modified="2013-07-16 16:32:45">
<key name="Colors" modified="2013-11-29 16:19:41" build="131107">
<key name="Palette1" modified="2013-11-29 16:19:41" build="131107">
<value name="Name" type="string" data="Monokai"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
@ -547,6 +549,30 @@
</key>
<value name="Count" type="dword" data="00000001"/>
</key>
<value name="OneTabPerGroup" type="hex" data="00"/>
<value name="ActivateSplitMouseOver" type="hex" data="01"/>
<value name="TabBtnDblClick" type="dword" data="00000000"/>
<value name="ConsoleExceptionHandler" type="hex" data="00"/>
<value name="SaveCmdHistory" type="hex" data="00"/>
<value name="CTS.IBeam" type="hex" data="01"/>
<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="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="CloseGroupPrcKey" type="dword" data="00000000"/>
<value name="SetDefaultTerminalStartupTSA" type="hex" data="01"/>
<value name="CTS.HtmlFormat" type="hex" data="00"/>
<value name="TabIcons" type="hex" data="01"/>
<value name="Multi.NewConsolePopup2" type="dword" data="00000000"/>
<value name="CloseAllConKey" type="dword" data="00000000"/>
<value name="CloseExceptConKey" 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"/>
</key>
</key>
</key>

View File

@ -1,3 +1,4 @@
e.=explorer .
gl=git log --oneline --all --graph --decorate
hej=dir
gl=git log --oneline --all --graph --decorate $*
ls=ls --color $*
pwd=cd

50
config/git.lua Normal file
View File

@ -0,0 +1,50 @@
---
-- 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-files --quiet --ignore-submodules")
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)

BIN
icons/cmder.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
icons/cmder_icon.psd Normal file

Binary file not shown.

BIN
icons/icon_16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
icons/icon_256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
icons/icon_32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
icons/icon_48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

2
vendor/Readme.md vendored
View File

@ -1,3 +1,3 @@
## Vendor
Softwere from third parties + init sctipt
Software from third parties + init sctipt

40
vendor/init.bat vendored
View File

@ -1,25 +1,43 @@
@echo off
:: Init Script for cmd.exe
:: Sets some nice defaults
:: Created as part of cmder project
:: Setting prompt style
@for /f "tokens=2 delims=:." %%x in ('chcp') do @set cp=%%x
:: The slow part
:: World without Unicode is a sad world
@chcp 65001>nul
:: It has to be lambda, I already made a logo
@prompt $E[1;32;40m$P$S{git}$S$_$E[1;30;40mλ$S$E[0m
@chcp %cp%>nul
:: Set prompt style
prompt $E[1;32;40m$P $_$E[1;30;40m$$ $E[0m
:: Pick right version of clink
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
@if "%PROCESSOR_ARCHITECTURE%"=="x86" (
set architecture=86
) else (
set architecture=64
)
:: Run clink
vendor\clink\clink_x%architecture%.exe inject --quiet --profile config
@set rootDir="%~dp0\.."
set rootDir=%CD%
:: Run clink
@%rootDir%\vendor\clink\clink_x%architecture%.exe inject --quiet --profile %rootDir%\config
:: Prepare for msysgit
:: I do not even know, copypasted from their .bat
@set PLINK_PROTOCOL=ssh
@if not defined TERM set TERM=msys
:: Enhance Path
PATH=%PATH%;%rootDir%\bin
@set git_install_root=%rootDir%\vendor\msysgit
@set PATH=%PATH%;%rootDir%\bin;%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%git_install_root%\share\vim\vim73;
:: Add aliases
doskey /macrofile=%rootDir%\config\aliases
@doskey /macrofile="%rootDir%\config\aliases"
:: cd into users homedir
cd /d "%userprofile%"
:: Set home path
@set HOME=%USERPROFILE%
@echo Welcome to cmder!