Create and document ZSH adapter (#9)

### Added
- A `.zsh-theme` file as an adapter for zsh
- Documentation for zsh installation

### Changed
- Created an `adapter/` directory for future adapters
This commit is contained in:
Matan Kushner 2019-04-17 08:38:36 -07:00 committed by GitHub
parent 2017bcfc7a
commit c5b9f39b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 5 deletions

View File

@ -15,8 +15,9 @@ Starship is a Rust port of the minimalistic, powerful, and extremely customizabl
## Development plans
The project is beginning as a port of Spaceship ZSH, but will be improved in areas where Spaceship ZSH was previously limited:
- Speed
- Concurrency of segment logic execution
- Speed
- Concurrency of segment logic execution
- Memoization of expensive operations
- Safety and error handling
- Testability of code
@ -38,6 +39,7 @@ I'm very new to Rust, so any help is appreciated when it comes to improving deve
- [ ] Execution time of the last command if it exceeds the set threshold.
### Other features
- [ ] `.starshiprc` configuration (JSON or TOML)
- [ ] Custom sections given commands or binaries
- [ ] Self-updating
@ -49,8 +51,9 @@ I'm very new to Rust, so any help is appreciated when it comes to improving deve
- [ ] Bash
### Test strategy
- [ ] Per-segment benchmarking
- [ ] Per-segment unit + integration tests
- [x] Per-segment benchmarking
- [x] Per-segment unit + integration tests
- [ ] Shell + OS matrix acceptance tests
## Setup
@ -58,7 +61,6 @@ I'm very new to Rust, so any help is appreciated when it comes to improving deve
### Prerequisites
- Rust v1.33 or higher
- Fisher v3
### Getting Started
@ -69,8 +71,30 @@ I'm very new to Rust, so any help is appreciated when it comes to improving deve
cargo install --path .
```
1. Navigate to the adapters directory
```bash
cd adapters
```
#### Fish
1. Install the fish shell prompt with fisher:
```bash
fisher $PWD
```
#### oh-my-zsh
1. Install the zsh theme:
```bash
cp starship.zsh-theme ~/.oh-my-zsh/themes
```
1. In `~/.zshrc`, find the line with `ZSH_THEME=` and set it to
```bash
ZSH_THEME="starship"
```

View File

@ -0,0 +1 @@
PROMPT='$(starship $?)'