-
Notifications
You must be signed in to change notification settings - Fork 3
/
init.bat
54 lines (41 loc) · 996 Bytes
/
init.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@echo off
rem Do not set codepage since it makes Eclipse act weird on DEV14
rem chcp 65001>nul
prompt [%USERNAME%@%COMPUTERNAME% $p]$_$$$s
rem Fake a UNIX environment
doskey clear=cls
doskey ls=dir /d $*
doskey cp=copy $*
doskey mv=move $*
doskey rm=del $*
doskey cat=type $*
doskey touch=type nul$G$G$*
doskey pwd=echo %CD%
doskey which=where $*
doskey ifconfig=ipconfig
doskey reboot=shutdown /r /t 0
doskey uptime=wmic path Win32_OperatingSystem get LastBootUpTime
rem Easier navigation
doskey cd=cd /D $*
doskey cd..=cd ..
doskey ..=cd ..
doskey ...=cd ../..
doskey ....=cd ../../..
rem List files properly
doskey l=dir /b $*
doskey ll=dir /b $*
rem Edit functionality
if exist ""%PROGRAMFILES%\Sublime Text 3"" (
doskey edit="%PROGRAMFILES%\Sublime Text 3\sublime_text.exe" $*
)
where atom >nul 2>&1
if %ERRORLEVEL% EQU 0 (
doskey edit=atom $*
)
where code >nul 2>&1
if %ERRORLEVEL% EQU 0 (
doskey edit=code $*
)
rem Open functionality
doskey open=start $*
@echo on