LoginSignup
1
1

More than 3 years have passed since last update.

Windows上のVSCodeのTerminalでエイリアスコマンドを使う

Last updated at Posted at 2020-05-17

エイリアスの実現方法

エイリアスはWindowsのコマンドマクロ機能を使う。以下URLの説明が詳しい。
https://qiita.com/little_hand_s/items/91d6bcb680eba10da835

doskey gs=git status

VSCode Terminalでの起動設定

shellArgs にシェル起動時のオプションとしてdoskeyコマンド実行の記述を行う。
(オプションはshellArgsに書くことを気づかず、小一時間迷った)
https://code.visualstudio.com/docs/editor/integrated-terminal#_can-i-use-cmders-shell-with-the-terminal-on-windows

{
  "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
  "terminal.integrated.shellArgs.windows": ["/k", "doskey", "/macrofie=C:\\XXX\\macros.txt"]
}

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1