SkillAgentSearch skills...

Cookbook.fish

From Shell to Plate: Savor the Zest of Fish 🦞

Install / Use

/learn @jorgebucaran/Cookbook.fish
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

The Fish Cookbook

From Shell to Plate: Savor the Zest of Fish 🦞

Welcome to The Fish Cookbook, your ultimate guide to unlocking the full potential of shell scripting with the delightful Fish. With its user-friendliness and convenient features, Fish stands out as a true gem among shells.

Master programming challenges with our curated collection of Fish recipes. Glide through your code with ease, whether you're a seasoned pro or a shell scripting newbie.

This cookbook is licensed under CC BY-NC-SA 4.0, ensuring knowledge and inspiration flow while respecting the rights of others.

What's on the Menu?

Setting Sail

Ahoy there, matey! Prepare to embark on a grand adventure with our trusty mate, Fish. In this section, we'll guide you through the step-by-step setup process to ensure you're ready to navigate the command line seas like a true captain. Let's get your shipshape and ready for the voyage ahead!

How the Shell do I Install Fish?

If you're ready to dive into the wonderful world of Fish, here's how you can get your hands wet. You can either follow the official website for instructions, or stick around and sail through the directions provided here for your OS.

For macOS with Homebrew:

brew update && brew install fish

For Debian:

wget http://download.opensuse.org/repositories/shells:fish:release:2/Debian_8.0/Release.key
apt-key add - < Release.key
echo 'deb http://download.opensuse.org/repositories/shells:/fish:/release:/2/Debian_8.0/ /' >> /etc/apt/sources.list.d/fish.list
apt-get update
apt-get install fish

For Ubuntu:

sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish

For CentOS:

cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/shells:fish:release:2/CentOS_7/shells:fish:release:2.repo
yum install fish

For Fedora:

dnf install fish

For Arch Linux:

pacman -S fish

For Gentoo:

emerge fish

For FreeBSD:

pkg install fish

For NetBSD:

pkgin install fish

For OpenBSD:

pkg_add fish

For the brave who want to build from source:

sudo apt-get -y install git gettext automake autoconf ncurses-dev build-essential libncurses5-dev

git clone -q --depth 1 https://github.com/fish-shell/fish-shell
cd fish-shell
autoreconf && ./configure
make && sudo make install

With Fish installed, a thrilling journey lies ahead. Gear up to explore the command line, unearthing Fish's core treasures and secrets. Here's to abundant and joyous fishing ventures! 🍻

Making Fish Your Default Shell, Ahoy!

Once you've installed Fish and it's safely located in your $PATH, for example, at /usr/local/bin, you can make it your default shell for a smooth sailing command line experience.

echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish

Discovering Fish's Installation Location

Curious about where Fish is installed? Utilize the handy which command.

which fish
/usr/local/bin/fish

Where to Seek Help

If you find yourself in need of assistance or have burning questions about Fish, fret not. There's a treasure trove of resources awaiting you:

  • Official Repository – Explore the official Fish repository on GitHub, where you can find the source code and contribute to the project.
  • Tutorial – Set sail with the Fish tutorial, a step-by-step guide to help you master the shell's features and functionality.
  • Documentation – Dive into the official documentation for Fish, where you'll discover a wealth of information and guidance.
  • r/fishshell – Join the community on Reddit, where fellow Fish enthusiasts gather to share their knowledge and adventures.
  • Gitter Channel – Hop aboard the Gitter Channel, a chat platform where you can engage with other Fish users and seek live assistance.
  • StackOverflow #fish – Cast your questions into the StackOverflow sea, specifically in the #fish tag, to receive guidance from the wider programming community.
  • awsm.fish – Discover a curated collection of prompts, plugins, and other hidden treasures to enhance your Fish journey. 🐚

Foundations

Decoding Prompts: What Are These Wiggly Characters?

The prompt is where you type commands and interact with Fish. Read more about the UNIX prompt here.

You might encounter something like this:

jb@mbp ~/C/cookbook>

The tilde ~ represents the home directory in a compact form, instead of /users/jb/home, /Users/jb, and so on.

The @ symbol is an arbitrary character chosen to separate the username jb from the computer's name mbp. You can learn to tailor your prompt to display only what's relevant to you.

The forward slash / serves as the path delimiter. At a glance, you can see that the current directory is inside the home directory, under Code/cookbook. The abbreviated path displays just C.

To customize the length of the abbreviated path, use:

set fish_prompt_pwd_dir_length NUMBER

Or, if you prefer not to have abbreviated paths:

set fish_prompt_pwd_dir_length 0

Then, your prompt will look like this:

jb@mbp ~/Code/cookbook>

The greater-than symbol > signifies the end of the prompt.

Not a fan of these conventions? Feel free to craft your own prompt to suit your preferences.

Where Am I in Fish?

Related Skills

View on GitHub
GitHub Stars2.1k
CategoryEducation
Updated9h ago
Forks103

Security Score

85/100

Audited on Mar 31, 2026

No findings