mac use iterm2+fish

1. Installation

  1. Install iterm2(instead of the terminal), https://www.iterm2.com/directly download, unzip and install.
  2. Installation fish(suggestive), brew install fishafter the installation is complete directly fishto

Two, fish configuration

Fish does not load ~/.bash_profile, there are two ways to add environment variables

  1. Input fish_configwill open the configuration page, add in abbreviations
    Insert picture description here
  2. 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 one php, adding set -x PATH /usr/local/Cellar/[email protected]/7.1.26/bin $PATH, and re-entering after exiting fish.
  3. If it is only a remote server and cannot open the browser, you can use fish_promptmethods 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
    

Guess you like

Origin blog.csdn.net/z772532526/article/details/99631977