Using Warp with [zsh|bash|fish]
Warp supports popular shells like bash, zsh, and fish. If your default shell is set to any other shell, you will see a banner indicating the shell is not supported and Warp will default to zsh.
Zsh is the default login and interactive shell on macOS (starting with macOS Catalina in 2019), replacing the bash shell. Warp tries to load your login shell by default, currently we support bash, fish, and zsh; if your login shell is set to something else e.g. Nushell Warp will load zsh instead.
You can switch your default shell to any other shell supported by Warp (bash, zsh, fish) using the instructions at the bottom of the page.
Zsh is a Unix shell built as an extension of Bourne shell with many improvements around customization e.g. support for plugins, themes, syntax highlighting, and auto-correction..
By default, macOS ships with zsh located in
/bin/zsh
. You can confirm this location by typing which zsh
in your Warp terminal. You can also check the version of zsh installed on your system by simply typing the following:$ zsh --version
You can customize your zsh shell environment by modifying the
.zshrc
file, which is a configuration file that is automatically created when zsh is installed in your system. It is typically located your home directory (~/.zshrc
).You can think of the
zshrc
file as a startup file that gets executed when a new instance of zsh is launched (new window, new tab/pane etc.)You can use the
.zshrc
file to customize behavior like: setting environment variables, adding aliases, changing the prompt, and more. It can also be used to set up key-bindings, and scripts that will automatically execute when a new instance of zsh is launched.The
.zshrc
file is located in the home directory, and can be opened with any text editor.Note that the dot (
.
) before the file’s name indicates that the file is hidden, (it) won’t be visible by default, and may not show up in Finder (press SHIFT-CMD-.
to show hidden files in Finder). You can edit the file from the terminal by typing nano ~/.zshrc
or vi ~/.zshrc
.When you make a change to the
zshrc
file, it needs to be reloaded or sourced again for the changes to take effect. You can do this by either restarting Warp, or by typing: source ~/.zshrc
.Macs come with bash pre-installed, typically located at the
/bin/bash
directory. You can customize bash by editing its configuration files (.bashrc
file for non-login interactive shell and .bash_profile
for login shells).If you run into issues configuring these files with Warp, please see Configuring and debugging your RC files.
You can customize your bash shell environment by modifying the
.bashrc
file, which is a configuration file that is automatically created when bash is installed in your system. It is typically located your home directory (~/.bashrc
).You can think of the
bashrc
file as a startup file that gets executed when a new instance of bash is launched (new window, new tab/pane etc.)Note that the dot (
.
) before the file’s name indicates that the file is hidden, (it) won’t be visible by default, and may not show up in Finder (press SHIFT-CMD-.
to show hidden files in Finder). You can edit the file from the terminal by typing nano ~/.bashrc
or vi ~/.bashrc
.You can use the
.bashrc
file to customize behavior like: setting environment variables, adding aliases, changing the prompt, and more. It can also be used to set up key-bindings, and scripts that will automatically execute when a new instance of bash is launched.When you make a change to your
bashrc
file, it needs to be reloaded or sourced again for the changes to take effect. You can do this by either restarting Warp, or by typing: source ~/.bashrc
.$ source ~/.bashrc
Pro Tip: Instead of typing
source ~/.bashrc
, you can create an alias for it inside the .bashrc file by typing -
alias reload="source ~/.bashrc"
So, now you can type `reload`
, to source the latest changes in the bashrc
While bash, and zsh come pre-installed on macOS, fish shell does not. So before using fish with Warp, you will need to install it. Install fish using one of the methods listed below -
- 1.With Homebrew: If you already have homebrew installed, you can simply type
brew install fish
, and follow the instructions. - 2.
Once you’ve installed fish on your computer, you can set it as your default shell, so Warp would use it every time a new tab, pane, or window is opened. You can either make fish the default shell for just Warp, from the session settings (
Settings > Features
, then Session
), or for your user account. To change your account's default shell, you need to run two commands, depending on how you installed fish -If you used Homebrew to install fish on a Mac with an Intel Processor, type the following two commands in Warp:
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)
If you used Homebrew to install fish on a Mac with Apple Silicon, type the following two commands in Warp:
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)
If you used the Mac installer available on fishshell.com to install fish, type the following two commands in Warp:
echo $(which fish) | sudo tee -a /etc/shells
chsh -s $(which fish)
If you prefer, you can also manually edit the /etc/shells file using the editor of your choice (you may need sudo privileges).
Why the different locations? The location of fish depends on how it was installed. Homebrew installs programs under
/usr/local
on Macs running Intel processors, but under /opt/homebrew
for Macs running Apple Silicon. So, if you used Homebrew to install fish on a Mac with Apple Silicon, the location of the executable is - /opt/homebrew/bin/fish
.
You can identify where fish is installed by running echo $(which fish)
.There are two ways to change the default shell that Warp uses for new tabs, windows, and panes:
- 1.We recommend you choose a shell in Warp by going to
Settings > Features
and scrolling to theSession
section, then select the "Startup shell for new sessions" - 2.You can also change your login shell by following the instructions below (or the macOS documentation)
The changes to your shell will only take effect when you start a new session.
To change the default shell to bash
chsh -s $(which bash)
Enter your password when prompted to complete the switch. Every new tab, and window you now open will start with bash.
To change the default shell to zsh
chsh -s $(which zsh)
Enter your password when prompted to complete the switch. Every new tab, and window you now open will start with zsh.
Last modified 1mo ago