LoginSignup
24
20

More than 3 years have passed since last update.

Mac Visual Studio Code のターミナルのShellをZshに変更する

Last updated at Posted at 2019-12-14

目的

  • Visual Studio CodeのターミナルShellをZshに変更する方法のメモを書く
    ※本作業はPCにすでにZshが入っており、terminalでは使用できていることを条件とする。

実施方法

  1. Visual Studio Code(以降、VScode)のエディタ画面の左上の「Code」をクリックする。
  2. 「基本設定」→「設定」と進む。
  3. 「設定の検索」にterminal.integrated.shell.osxと入力する。
  4. 「settings.jsonで編集」をクリックする。
  5. 開いたファイルに下記の内容を追記する。場所はどこでもOK

    "terminal.integrated.shell.osx": "/usr/local/bin/zsh"
    
  6. PCを再起動させてからVScodeのターミナルを開く

  7. 下記の内容が出力されるがEnterを押す

    This is the Z Shell configuration function for new users,
    zsh-newuser-install.
    You are seeing this message because you have no zsh startup files
    (the files .zshenv, .zprofile, .zshrc, .zlogin in the directory~).  
    This function can help you with a few settings that should make your use of the shell easier.
    
    You can:
    
    (q)  Quit and do nothing.  The function will be run again next time.
    
    (0)  Exit, creating the file ~/.zshrc containing just a comment.
         That will prevent this function being run again.
    
    (1)  Continue to the main menu.
    
    --- Type one of the keys in parentheses --- 
    
  8. 下記コマンドを実行してshellがZshになっているか確認する。

    echo $SHELL
    >/usr/local/bin/zsh
    
24
20
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
24
20