Add fish_prompt

This commit is contained in:
Matan Kushner 2019-04-13 00:33:50 -04:00
parent 240fb6a02c
commit 4ce4899f81
No known key found for this signature in database
GPG Key ID: 4B98C3A8949CA8A4
4 changed files with 28 additions and 3 deletions

View File

@ -1,6 +1,28 @@
<h3 align="center">Starship ✨🚀</h3> <h3 align="center">Starship ✨🚀</h3>
<p align="center">The cross-platform prompt for astronauts.</p> <p align="center">The cross-shell prompt for astronauts.</p>
--- ---
This is very much work in progress, so please don't try to use it just yet! 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
```

3
fish_prompt.fish Normal file
View File

@ -0,0 +1,3 @@
function fish_prompt
starship $status
end

View File

@ -13,7 +13,7 @@ use clap::{App, Arg};
fn main() { fn main() {
let args = App::new("Starship") 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 // pull the version number from Cargo.toml
.version(crate_version!()) .version(crate_version!())
// pull the authors from Cargo.toml // pull the authors from Cargo.toml

View File

@ -42,7 +42,7 @@ impl Segment {
} }
/// Sets the style of the segment /// Sets the style of the segment
/// ///
/// Accepts either `Color` or `Style`. /// Accepts either `Color` or `Style`.
pub fn set_style<T>(&mut self, style: T) -> &mut Segment pub fn set_style<T>(&mut self, style: T) -> &mut Segment
where where