I have had a basic zsh setup for ages with the gentoo style PS1.
After reading about fish shell being ported to rust I thought I would give it a try.
fish’s core code has been ported from C++ to Rust
we’ve rebuilt the foundation in Rust to embrace modern computing
What's new in fish 4.0 - fish blog
Release fish 4.0.0 - fish-shell/fish-shell
Advantages #
- Clean Scripting
- Command Suggestions
- Abbreviations
- Web Based Config
Configuring #
Initial config can be done in a web browser by running fish_config.
It is also possible to configure from cli using fish_config
fish_config theme show(lists builtin themes)fish_config prompt show(lists builtin prompts)fish_config prompt save <prompt-name>(saves prompt)fish_config theme save <theme-name>(saves theme)
There are also additional custom prompts available to download.
I customized the default prompt & am using the ayu Dark color theme.
PWD Dir Sortening #
One thing I didn't like with the default setup is how the path displayed in the prompt was shortened.
I quickly found there is a setting to disable this.
set
fish_prompt_pwd_dir_lengthto the number of characters. Setting it to0or an invalid value will disable shortening entirely.
set fish_prompt_pwd_dir_length 0
Fish Functions #
There are some helpful functions built in to fish like fish_add_path.
fish_add_pathis a simple way to add more directories to fish’s PATH. It does this by adding the directories either to fish_user_paths or directly to PATH (if the --path switch is given). fish_add_path - fish-shell documentation
## $PATH
###
# HOME
fish_add_path $HOME/bin
# NODEJS
fish_add_path $HOME/node/bin
# RUST
fish_add_path $HOME/.cargo/bin
Fish Shell Additions #
- Atuin for Shell History
- Replace
lswitheza - Replace
treewitheza - Zoxide for directory jumping
- Fish function to extract compressed files
- Support for extracting
.tar.zst
Atuin #
Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. Github - atuinsh/atuin
eza #
eza is a modern alternative for the venerable file-listing command-line program ls that ships with Unix and Linux operating systems Github - eza-community/eza
zoxide #
zoxide is a smarter cd command, It remembers which directories you use most frequently, so you can jump to them in just a few keystrokes. Github - ajeetdsouza/zoxide
Download #
The scripts and my dotfiles can be downloaded from github.
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.