From 4ce4899f81de37ab6e9916981c628ea057e429a7 Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Sat, 13 Apr 2019 00:33:50 -0400 Subject: [PATCH] Add fish_prompt --- README.md | 24 +++++++++++++++++++++++- fish_prompt.fish | 3 +++ src/main.rs | 2 +- src/segment.rs | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 fish_prompt.fish diff --git a/README.md b/README.md index 4dba8a84..842517e5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,28 @@

Starship ✨🚀

-

The cross-platform prompt for astronauts.

+

The cross-shell prompt for astronauts.

--- This is very much work in progress, so please don't try to use it just yet! + +## Setup + +### Prerequisites + +- Rust v1.33 or higher +- Fisher v3 + +### Getting Started + +1. `cd` to the root of the **starship** repo +1. Install the **starship** binary: + + ```bash + cargo install --path . + ``` + +1. Install the fish shell prompt with fisher: + + ```bash + fisher $PWD + ``` diff --git a/fish_prompt.fish b/fish_prompt.fish new file mode 100644 index 00000000..965398ea --- /dev/null +++ b/fish_prompt.fish @@ -0,0 +1,3 @@ +function fish_prompt + starship $status +end diff --git a/src/main.rs b/src/main.rs index f8bc4bcd..dfd32813 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use clap::{App, Arg}; fn main() { let args = App::new("Starship") - .about("The cross-platform prompt for astronauts. ✨🚀") + .about("The cross-shell prompt for astronauts. ✨🚀") // pull the version number from Cargo.toml .version(crate_version!()) // pull the authors from Cargo.toml diff --git a/src/segment.rs b/src/segment.rs index 99f3c0a9..a9a188f6 100644 --- a/src/segment.rs +++ b/src/segment.rs @@ -42,7 +42,7 @@ impl Segment { } /// Sets the style of the segment - /// + /// /// Accepts either `Color` or `Style`. pub fn set_style(&mut self, style: T) -> &mut Segment where