https://github.com/deecewan/prompt
A custom shell prompt
https://github.com/deecewan/prompt
Last synced: 2 months ago
JSON representation
A custom shell prompt
- Host: GitHub
- URL: https://github.com/deecewan/prompt
- Owner: deecewan
- Created: 2018-03-27T15:48:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-27T22:19:23.000Z (about 8 years ago)
- Last Synced: 2025-06-28T06:02:43.678Z (12 months ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# prompt
> My terminal prompt
This is a personal terminal prompt written in rust. It is based rather heavily
on [pure](https://github.com/sindresorhus/pure), as that was my go-to
previously.
The goals of this project:
- [ ] fast (still need to confirm, but feels fast)
- [x] Vi-keys status
I moved off pure because I found it was slowing down quite a lot in large
repositories. I found an alternative, [purs](https://github.com/xcambar/purs),
which provided some inspiration for this. I wanted a different vi-keys display,
and I found the speed dropping in my main work codebase.
So, `prompt`. It's super-fast, but I haven't played with it day-to-day yet. It
almost certainly has some side-effects and unintended consequences. This is not
meant to be a 'supports all workflows' tool. It supports my workflow, and
supports it as quick as possible, while still looking good.
If you want to add/remove/change segments, fork the codebase, and keep your own
prompt.
## Installation
- clone the repo (the location is `$CODE` from now on)
- `cd $CODE`
- `cargo build --release`
- open your `~/.zshrc`
- add the following:
```zsh
function zle-line-init zle-keymap-select {
PROMPT=$($CODE/target/release/prompt $? "$KEYMAP")
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
```
- if you don't want to display the vi-keys status, simply remove the `$KEYMAP`
at the end of the command.
- `source ~/.zshrc` (you may want to open a new terminal window if you had
another theme before)
- That's it