The core information that fish-fp displays is organized into two categories:
- Machine information:
- Who is the current
$USER? - What is my
hostname? - Is my shell connected to another host via
ssh?
- Who is the current
- File-system information;
- What is my current directory?
- Is my current directory part of a git-controlled repository? If so:
- What is the name of the repository?
- What is the name of the currently checked-out branch?
Additionally, fish-fp colors the prompt when a previous command exits with a
non-zero exit code. The lambda sigil becomes a # when the current $USER is
root.
Some prompts aim to support dozens of applications. I find these prompts
impressive to look at but too noisy for me to reliably parse. With fish-fp,
I'm aiming to create a prompt that satisfies the following design goals:
- Thin: I want my prompt to fit within 80 characters.
- Spacious:
fish-fpspans two lines so that the commands that you type can fit on one line. - Minimal: I'm not interested in encoding a maelstrom of information like
my current versions of
docker,virtualenv,node,ruby,elixir,go,kubernetes; laptop battery information; stock market prices; status of the nearest coffee machine; etc. - Few dependencies: If your shell can resolve
git,time, GNUcoreutilsand your terminal can render unicode, you can use this prompt. - Lambda sigil: The Greeks liked functional programming.
- Easily parsable: I want all of the information that my prompt displays to be in the same location at all times. Some prompts conditionally show or hide information; this confuses me. I want all of the information that my prompt renders to be visible at all times; I can more quickly and reliably parse the information this way. Instead of conditionally displaying information, I conditionally color elements.
For now, copy-and-paste prompt.fish into your config.fish. I'm considering
packaging this with Nix. I'll also consider packaging this with some
fish package manager if people are interested.
