Skip to content

Instantly share code, notes, and snippets.

@minipaper
Last active February 15, 2022 11:23
Show Gist options
  • Save minipaper/8ed450f5a2869e13c5d345b01476eed0 to your computer and use it in GitHub Desktop.
Save minipaper/8ed450f5a2869e13c5d345b01476eed0 to your computer and use it in GitHub Desktop.
How to persist doskey macros

Install

  1. 파일 macros.doskeyC:\에 저장합니다.
  • 본인이 원하는 alias를 추가 편집합니다.
  1. regedit 실행 후 HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\ 경로로 이동합니다.
  • 문자열 값으로 Autorun 생성 후 값을 doskey /macrofile="C:\macros.doskey"을 입력합니다.

Usage

단축키명=실행할명령어 뒤에 $1 $2는 단축키 뒤에 argument 를 원하는 곳에 배치 할 수 있습니다. $* 은 그대로 argument를 전달합니다.

Link

ls=dir /B $1
ip=ipconfig $*
e=exit
dc=docker-compose $*
dcu=docker-compose up -d
dcd=docker-compose down
yt=yt-dlp -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio --merge-output-format mp4 $*
ya=yt-dlp -x --audio-format mp3 $*
nd=del main.ts&&m3u8.exe -o="." -u="$*"&&ffmpeg -i main.ts -acodec copy -vcodec copy main.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment