Just discovered doskey emacs=emacs -nw $*, but without something like .bashrc, I'll have to type that every time I start a shell, right?

link|improve this question
(g)Vim > Emacs! – ThiefMaster May 23 '10 at 10:45
This question isn't identical, but the answer covers your scenario. – Marcelo Cantos May 23 '10 at 10:51
feedback

migrated from stackoverflow.com May 23 '10 at 11:10

This question came from our site for professional and enthusiast programmers.

2 Answers

This is a very good question. I found this. I suppose you could make a cmd script and have it run when starting cmd :-?

; Run a command when CMD.exe starts
[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
"AutoRun"=-

EDIT: I just tried it. I have AutoRun=C:\mini\bashrc.cmd and bashrc.cmd is

@echo off
set TEST_VAR=something

when I start cmd and enter echo %TEST_VAR% it says something. So it works :)

link|improve this answer
2  
Small snippet I use: doskey∙♦=exit (where is [char]4). Enables you to close the shell with Ctrl+D, Enter. – Joey May 23 '10 at 12:13
@Johannes Rössel Nice one, thanks :-) – nc3b May 23 '10 at 12:19
This work great, nice job nc3b. – Robert S Ciaccio Jul 28 '10 at 3:57
This is absolutely amazing +1 – Mehrdad Jun 11 '11 at 20:15
feedback

You can create a shortcut to cmd.exe and add the /k switch to run a certain .bat file on startup, something like this:

cmd.exe /k "%HOMEDRIVE%\%HOMEPATH%\cmd-startup.bat"

cmd-startup.bat in your home dir would then work just like .bashrc

link|improve this answer
feedback

Your Answer

 
or
required, but never shown