Setup `fish` shell and `oh my fish`
Install fish
f
riendlyi
nteractivesh
ell
sudo apt install fish
# setup `fish` as default shellchsh -s $(which fish)
# alternative to set the default shell, if the above method does not work.# find where fish is installedwhich fish# open the filesudo nano /etc/shells# add the path from above in the file.
Restart the operating system for the changes to be updated
Install oh-my-fish
Oh My Fish
provides core infrastructure to allow you to install packages which extend or modify the look of your shell. It’s fast, extensible and easy to use.
https://github.com/oh-my-fish/oh-my-fish
# Install Oh-My-Fish, required for themescurl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish
omf install bobthefish
# [Optional] Install NerdFont --> FiraCodewget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FiraCode.zip -O FiraCode.zip
unzip FiraCode.zip -d FiraCode
mkdir -p ~/.fonts
cp FiraCode/*.ttf ~/.fonts/
fc-cache -fv
fc-list | grep "FiraCode"
rm -rf FiraCode.zip FiraCode
set -g theme_powerline_fonts no
#activating the nerd-fonts in the `fish` terminalset -g theme_nerd_fonts yes
Troubleshoot
For GNOME Terminal (default terminal on Ubuntu)
-
Open GNOME Terminal Preferences:
- Open the terminal.
- Click the hamburger menu (☰) in the top-right corner.
- Select Preferences.
-
Select Your Profile:
- In the left pane, choose the profile you want to edit (e.g., “Unnamed” or “Default”).
-
Change Font:
- Scroll down to the Text section.
- Toggle Custom Font on.
- Click the font selection box, and a font chooser dialog will appear.
-
Select Font:
- Search for
FiraCode Nerd Font
in the font list. - Choose the desired size and click Select.
- Search for
-
Save and Close:
- The font will update immediately. Close the preferences window to apply the changes.
For VS Code
In the Editor
-
Open VS Code Settings:
- Click the gear icon in the bottom-left corner and select Settings.
- Alternatively, press
Ctrl + ,
.
-
Search for Font Family:
- In the search bar at the top, type
editor.fontFamily
.
- In the search bar at the top, type
-
Update the Font Family:
- Click the pencil icon next to Editor: Font Family and edit the field.
- Add
FiraCode Nerd Font
at the beginning of the list:"FiraCode Nerd Font", Consolas, "Courier New", monospace
-
Enable Font Ligatures (Optional):
- Search for editor.fontLigatures in the settings.
- Toggle the option On, or add this line in your
settings.json
file:"editor.fontLigatures": true
In the Integrated Terminal
-
Open Settings:
- Follow the steps above to access the Settings.
-
Search for Terminal Font Family:
- In the search bar, type
terminal.integrated.fontFamily
.
- In the search bar, type
-
Update the Terminal Font:
- Click the pencil icon and edit the field.
- Add
FiraCode Nerd Font
:
-
Adjust Font Size (Optional):
- Search for
terminal.integrated.fontSize
and increase or decrease the size as needed, e.g.,14
.
- Search for
Options to override some of the following default options in config.fish
:
set -g theme_display_git noset -g theme_display_git_dirty noset -g theme_display_git_untracked noset -g theme_display_git_ahead_verbose yesset -g theme_display_git_dirty_verbose yesset -g theme_display_git_stashed_verbose yesset -g theme_display_git_default_branch yesset -g theme_git_default_branches master mainset -g theme_git_worktree_support yesset -g theme_use_abbreviated_branch_name yesset -g theme_display_vagrant yesset -g theme_display_docker_machine noset -g theme_display_k8s_context yesset -g theme_display_hg yesset -g theme_display_virtualenv noset -g theme_display_nix noset -g theme_display_ruby noset -g theme_display_node yesset -g theme_display_user sshset -g theme_display_hostname sshset -g theme_display_vi noset -g theme_display_date noset -g theme_display_cmd_duration yesset -g theme_title_display_process yesset -g theme_title_display_path noset -g theme_title_display_user yesset -g theme_title_use_abbreviated_path noset -g theme_date_format "+%a %H:%M"set -g theme_date_timezone America/Los_Angelesset -g theme_avoid_ambiguous_glyphs yesset -g theme_powerline_fonts noset -g theme_nerd_fonts yesset -g theme_show_exit_status yesset -g theme_display_jobs_verbose yesset -g default_user your_normal_userset -g theme_color_scheme darkset -g fish_prompt_pwd_dir_length 0set -g theme_project_dir_length 1set -g theme_newline_cursor yesset -g theme_newline_prompt '$ '