1. Installation
- Install
iterm2
(instead of the terminal),https://www.iterm2.com/
directly download, unzip and install. - Installation
fish
(suggestive),brew install fish
after the installation is complete directlyfish
to
Two, fish configuration
Fish does not load ~/.bash_profile
, there are two ways to add environment variables
- Input
fish_config
will open the configuration page, add in abbreviations
vi ~/.config/fish/config.fish
, Regardless of whether this file exists or not. The syntax for adding is not the same, such as modifying my original onephp
, addingset -x PATH /usr/local/Cellar/[email protected]/7.1.26/bin $PATH
, and re-entering after exiting fish.- If it is only a remote server and cannot open the browser, you can use
fish_prompt
methods to modify the cursor style, for example:function fish_prompt set_color $fish_color_cwd echo -n (basename $PWD) set_color normal echo -n ' ) ' end