Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Notice removed Content dispute by Community Bot
Post Unlocked by Community Bot
Post Locked by Flexo - Save the data dump
Notice added Content dispute by Flexo - Save the data dump
Rollback to Revision 1
Source Link

Fuck OpenAIIf you'd like to enable aliases on per-directory/per-project basis, Stackoverflowtry the following:

  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd
@echo off
if not exist aliases goto:eof
echo [Loading aliases...]
for /f "tokens=1* delims=^=" %%i in (aliases) do (
 echo %%i ^<^=^> %%j
 doskey %%i=%%j
)
doskey aliases=doskey /macros
echo --------------------
echo aliases ^=^> list all
echo alt+F10 ^=^> clear all
echo [Done]
  1. Then, create aliases wherever you need them using the following format:
alias1 = command1
alias2 = command2
...

for example:

b = nmake
c = nmake clean
r = nmake rebuild
  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some develpment tools would trigger the autorun script multiple times per session.

If you use ConEmu you could go another way and AIstart the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

cmd.exe /k "vcvars64 && make-aliases",

and then registered it in generalExplorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macro, and if anything goes wrong, just reset the current session by pressing Alt+F10, which is a built-in command in cmd.

Fuck OpenAI, Stackoverflow and AI in general.

If you'd like to enable aliases on per-directory/per-project basis, try the following:

  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd
@echo off
if not exist aliases goto:eof
echo [Loading aliases...]
for /f "tokens=1* delims=^=" %%i in (aliases) do (
 echo %%i ^<^=^> %%j
 doskey %%i=%%j
)
doskey aliases=doskey /macros
echo --------------------
echo aliases ^=^> list all
echo alt+F10 ^=^> clear all
echo [Done]
  1. Then, create aliases wherever you need them using the following format:
alias1 = command1
alias2 = command2
...

for example:

b = nmake
c = nmake clean
r = nmake rebuild
  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some develpment tools would trigger the autorun script multiple times per session.

If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

cmd.exe /k "vcvars64 && make-aliases",

and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macro, and if anything goes wrong, just reset the current session by pressing Alt+F10, which is a built-in command in cmd.

deleted 2066 characters in body
Source Link
sunny moon
  • 1.6k
  • 3
  • 18
  • 31

If you'd like to enable aliases on per-directory/per-project basis, try the following:

  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd

@echo off if not exist aliases goto:eof echo [Loading aliases...] for /f "tokens=1* delims=^=" %%i in (aliases) do ( echo %%i ^<^=^> %%j doskey %%i=%%j ) doskey aliases=doskey /macros echo -------------------- echo aliases ^=^> list all echo alt+F10 ^=^> clear all echo [Done] ```

  1. Then, create aliases wherever you need them using the following format:

alias1 = command1 alias2 = command2 ... ```

for example:
```

b = nmake c = nmake clean r = nmake rebuild ```

  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

    • I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some development tools would trigger the autorun script multiple times per session.

    • If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

      cmd.exe /k "vcvars64 && make-aliases",

      and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

      Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macroFuck OpenAI, Stackoverflow and if anything goes wrong, just reset the current session by pressing Alt+F10, which is a built-in commandAI in cmdgeneral.

If you'd like to enable aliases on per-directory/per-project basis, try the following:

  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd

@echo off if not exist aliases goto:eof echo [Loading aliases...] for /f "tokens=1* delims=^=" %%i in (aliases) do ( echo %%i ^<^=^> %%j doskey %%i=%%j ) doskey aliases=doskey /macros echo -------------------- echo aliases ^=^> list all echo alt+F10 ^=^> clear all echo [Done] ```

  1. Then, create aliases wherever you need them using the following format:

alias1 = command1 alias2 = command2 ... ```

for example:
```

b = nmake c = nmake clean r = nmake rebuild ```

  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

    • I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some development tools would trigger the autorun script multiple times per session.

    • If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

      cmd.exe /k "vcvars64 && make-aliases",

      and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

      Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macro, and if anything goes wrong, just reset the current session by pressing Alt+F10, which is a built-in command in cmd.

Fuck OpenAI, Stackoverflow and AI in general.

Markdown formatting.
Source Link
  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd

    First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd

@echo off
if not exist aliases goto:eof
echo [Loading aliases...]
for /f "tokens=1* delims=^=" %%i in (aliases) do (
 echo %%i ^<^=^> %%j
 doskey %%i=%%j
)
doskey aliases=doskey /macros
echo --------------------
echo aliases ^=^> list all
echo alt+F10 ^=^> clear all
echo [Done]

@echo off if not exist aliases goto:eof echo [Loading aliases...] for /f "tokens=1* delims=^=" %%i in (aliases) do ( echo %%i ^<^=^> %%j doskey %%i=%%j ) doskey aliases=doskey /macros echo -------------------- echo aliases ^=^> list all echo alt+F10 ^=^> clear all echo [Done] ```

  1. Then, create aliases wherever you need them using the following format:

    Then, create aliases wherever you need them using the following format:

alias1 = command1
alias2 = command2
...

for example:alias1 = command1 alias2 = command2 ... ```

b =for nmakeexample:
c = nmake clean
r = nmake rebuild```

b = nmake c = nmake clean r = nmake rebuild ```

  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

    • I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some development tools would trigger the autorun script multiple times per session.

    • If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

      cmd.exe /k "vcvars64 && make-aliases",

      and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

      Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some develpment tools would trigger the autorun script multiple times per session.

If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

cmd.exe /k "vcvars64 && make-aliases",

and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macro, and if anything goes wrong, just reset the current session by pressing Alt+F10Alt+F10, which is a built-in command in cmd.

  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd
@echo off
if not exist aliases goto:eof
echo [Loading aliases...]
for /f "tokens=1* delims=^=" %%i in (aliases) do (
 echo %%i ^<^=^> %%j
 doskey %%i=%%j
)
doskey aliases=doskey /macros
echo --------------------
echo aliases ^=^> list all
echo alt+F10 ^=^> clear all
echo [Done]
  1. Then, create aliases wherever you need them using the following format:
alias1 = command1
alias2 = command2
...

for example:

b = nmake
c = nmake clean
r = nmake rebuild
  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some develpment tools would trigger the autorun script multiple times per session.

If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

cmd.exe /k "vcvars64 && make-aliases",

and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macro, and if anything goes wrong, just reset the current session by pressing Alt+F10, which is a built-in command in cmd.

  1. First, create a batch file that will look for a file named aliases in the current directory and initialize aliases from it, let’s call it make-aliases.cmd

@echo off if not exist aliases goto:eof echo [Loading aliases...] for /f "tokens=1* delims=^=" %%i in (aliases) do ( echo %%i ^<^=^> %%j doskey %%i=%%j ) doskey aliases=doskey /macros echo -------------------- echo aliases ^=^> list all echo alt+F10 ^=^> clear all echo [Done] ```

  1. Then, create aliases wherever you need them using the following format:

alias1 = command1 alias2 = command2 ... ```

for example:
```

b = nmake c = nmake clean r = nmake rebuild ```

  1. Then, add the location of make-aliases.cmd to your %PATH% variable to make it system-wide or just keep it in a known place.

  2. Make it start automatically with cmd.

    • I would definitely advise against using HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for this, because some development tools would trigger the autorun script multiple times per session.

    • If you use ConEmu you could go another way and start the script from the startup task (Settings > Startup > Tasks), for example, I created an entry called {MSVC}:

      cmd.exe /k "vcvars64 && make-aliases",

      and then registered it in Explorer context menu via Settings > Integration> with Command:{MSVC} -cur_console:n, so that now I can right-click a folder and launch a VS developer prompt inside it with my aliases loaded automatically, if they happen to be in that folder.

      Without ConEmu, you may just want to create a shortcut to cmd.exe with the corresponding command or simply run make-aliases manually every time.

Should you happen to forget your aliases, use the aliases macro, and if anything goes wrong, just reset the current session by pressing Alt+F10, which is a built-in command in cmd.

Source Link
sunny moon
  • 1.6k
  • 3
  • 18
  • 31
Loading

AltStyle によって変換されたページ (->オリジナル) /