summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-04-17 08:38:36 -0700
committerGitHub <noreply@github.com>2019-04-17 08:38:36 -0700
commitc5b9f39b92ad3f38cb1c2425e82aa30e51641dac (patch)
treeb76f5fd9e6bec0656b5cb3afd6d438efd7b4add7
parent2017bcfc7a5120dae3216a4e1d891da178f5c165 (diff)
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
-rw-r--r--README.md34
-rw-r--r--adapters/fish_prompt.fish (renamed from fish_prompt.fish)0
-rw-r--r--adapters/starship.zsh-theme1
3 files changed, 30 insertions, 5 deletions
diff --git a/README.md b/README.md
index 44afcfb2a..f643fc824 100644
--- a/README.md
+++ b/README.md
@@ -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"
+ ```
diff --git a/fish_prompt.fish b/adapters/fish_prompt.fish
index 965398ea1..965398ea1 100644
--- a/fish_prompt.fish
+++ b/adapters/fish_prompt.fish
diff --git a/adapters/starship.zsh-theme b/adapters/starship.zsh-theme
new file mode 100644
index 000000000..ded509824
--- /dev/null
+++ b/adapters/starship.zsh-theme
@@ -0,0 +1 @@
+PROMPT='$(starship $?)'