banner
amtoaer

晓风残月

竹杖芒鞋轻胜马,谁怕?一蓑烟雨任平生。
github
x
telegram
steam
nintendo switch
email

From oh my zsh to oh my fish

Why two articles in one day? Probably to commemorate the once-every-four-years 2.29 day (laughs)

Background

As we all know, there are many types of shells, with the most commonly used being bash and zsh. oh my zsh is an extension toolset based on zsh. Since I started using Linux, I have been using zsh & oh my zsh. It is easy to use and extend, but it has a major drawback: it's too slow!

Imagine that you need to open the terminal and switch to the blog directory. When you run the terminal, you start typing the command and expect to see the following result:

~
⟩ j blog
/home/jeasonlau/File/blog

~/File/blog

But the actual result is:

j ~
⟩ blog
unknown command : blog

~

Surprising, isn't it? Unexpected, right?

After encountering this situation multiple times, I couldn't bear it anymore and started the journey of changing the shell...

Switching

I have also heard of another famous shell: fish. When I complained about the slowness of zsh in the "NEU lug" group, I accidentally discovered that several group members were using fish, so I decided to switch.

After searching the fish documentation, I found that it can be directly installed on Arch-based distributions, so I ran the following command:

sudo pacman -S fish

After successful installation, I used the following command to change the default shell to fish:

chsh -s /usr/local/bin/fish

After experiencing it, I felt that it was indeed faster than zsh. It also has built-in support for command highlighting, command suggestions, and other features, so there is no need to manually configure it. It can be used out of the box.

Themes

After successfully switching, the most important task is to change the theme! Adhering to the basic principle of (the command line should not be plain and boring!), I started searching for recommended themes for fish. Although I didn't find any results, I discovered something else: oh my fish.

It is a tool similar to oh my zsh, which extends the functionality of the fish shell. Specifically, it includes plugins and themes. So I followed the documentation to install it:

curl -L https://get.oh-my.fish | fish

After installation, you can choose from the available themes. Once you find your favorite theme, simply execute the following command to install it:

omf install <theme name>

After going through all the themes, let me recommend a few.

Here are four themes that I personally like:

  1. pure (use with caution)

    This theme is the one I used on zsh and has been ported to fish. However, after trying it, I found that it is not very compatible and often encounters strange problems. But because of my attachment to it, I still put it in the first place.

    image

    image

  2. clearance

    Another minimalist theme, which has a similar effect to pure, but the screenshots make it look less appealing.

    image

  3. tomita

    The screenshots look great, but the default colors are slightly different from the screenshots. Also, the default color of the fish logo is light yellow, which is not very friendly for light backgrounds. (Of course, you can modify the configuration file to change the colors)

    image

    image

  4. nai

    If the previous themes were minimalist, this one is extremely minimalist. But even though it's simple, it has a unique charm.

    image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.