Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorgebucaran/hydro
Ultra-pure, lag-free prompt with async Git status—just for Fish
https://github.com/jorgebucaran/hydro
async fish fish-plugin fish-prompt
Last synced: 5 days ago
JSON representation
Ultra-pure, lag-free prompt with async Git status—just for Fish
- Host: GitHub
- URL: https://github.com/jorgebucaran/hydro
- Owner: jorgebucaran
- License: mit
- Created: 2019-01-20T05:55:04.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T11:07:50.000Z (7 months ago)
- Last Synced: 2024-05-02T05:31:15.797Z (6 months ago)
- Topics: async, fish, fish-plugin, fish-prompt
- Language: Shell
- Homepage:
- Size: 134 KB
- Stars: 587
- Watchers: 8
- Forks: 50
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awsm.fish - Hydro - Lag-free prompt with async Git status (ooh la la) (Prompts)
- stars - jorgebucaran/hydro - Ultra-pure, lag-free prompt with async Git status—just for Fish (Shell)
README
# Hydro
> Ultra-pure, lag-free prompt with async Git status. Designed only for [Fish](https://fishshell.com).
[![](https://user-images.githubusercontent.com/56996/103166797-f807ee00-4868-11eb-9818-c661584274c8.gif)](#hydro)
## Installation
Install with [Fisher](https://github.com/jorgebucaran/fisher):
```console
fisher install jorgebucaran/hydro
```## Features
One prompt symbol to rule them all. [Change it](#configuration)?
~ ❱ ⎢Display Git branch name and status—prompt repaints asynchronously! ✨
~/p/hydro main ❱ touch Solution
~/p/hydro main• ❱ ⎢> `•` indicates that there are staged, unstaged or untracked files.
Display how many commits ahead and/or behind you are of your upstream—prompt repaints asynchronously!
~/p/hydro main• ↓2 ❱ git commit -am Hotfix
~/p/hydro main ↑1 ↓2 ❱ git pull --rebase && git push
~/p/hydro main ❱ ⎢Display [`$CMD_DURATION`](https://fishshell.com/docs/current/language.html?highlight=cmd_duration#envvar-CMD_DURATION) when > `1` second. [Configurable](#configuration).
~/p/hydro main ❱ git push --quiet
~/p/hydro main 1.1s ❱ ⎢Display the last non-zero [exit status](https://fishshell.com/docs/current/tutorial.html#exit-status) (or statuses) using [`$pipestatus`](https://fishshell.com/docs/current/language.html?highlight=cmd_duration#envvar-pipestatus).
~/p/hydro main ❱ false
~/p/hydro main | 1 ❱ ⎢
~/p/hydro main ❱ true | false | false
~/p/hydro main | 0 1 1 ❱ ⎢Truncate [`$PWD`](https://fishshell.com/docs/current/language.html?highlight=cmd_duration#envvar-PWD) segments except for the basename and root of Git repos.
~ ❱ projects/hydro/
~/p/hydro ❱ functions/share/
~/p/hydro/f/share ❱ ⎢Display the current bindings mode.
I ~ ❱ Esc
N ~ ❱ R
R ~ ❱ ⎢## Performance
Blazing fast would be an understatement considering that the [LLVM repo](https://github.com/llvm/llvm-project) has over 375,000 commits!
~/llvm-project main ❱ time fish_prompt
~/llvm-project main ❱
________________________________________________________
Executed in 79.00 micros fish external
usr time 71.00 micros 71.00 micros 0.00 micros
sys time 9.00 micros 9.00 micros 0.00 micros## Configuration
Modify variables using `set --universal` from the command line or `set --global` in your `config.fish` file.
### Symbols
| Variable | Type | Description | Default |
| ------------------------- | ------ | ------------------------------- | ------- |
| `hydro_symbol_start` | string | Prompt start symbol. | |
| `hydro_symbol_prompt` | string | Prompt symbol. | `❱` |
| `hydro_symbol_git_dirty` | string | Dirty repository symbol. | `•` |
| `hydro_symbol_git_ahead` | string | Ahead of your upstream symbol. | `↑` |
| `hydro_symbol_git_behind` | string | Behind of your upstream symbol. | `↓` |### Colors
> Any argument accepted by [`set_color`](https://fishshell.com/docs/current/cmds/set_color.html).
| Variable | Type | Description | Default |
| ---------------------- | ----- | ------------------------------ | -------------------- |
| `hydro_color_pwd` | color | Color of the pwd segment. | `$fish_color_normal` |
| `hydro_color_git` | color | Color of the git segment. | `$fish_color_normal` |
| `hydro_color_start` | color | Color of the start symbol. | `$fish_color_normal` |
| `hydro_color_error` | color | Color of the error segment. | `$fish_color_error` |
| `hydro_color_prompt` | color | Color of the prompt symbol. | `$fish_color_normal` |
| `hydro_color_duration` | color | Color of the duration section. | `$fish_color_normal` |### Flags
| Variable | Type | Description | Default |
| ----------------- | ------- | -------------------------------------------- | ------- |
| `hydro_fetch` | boolean | Fetch git remote in the background. | `false` |
| `hydro_multiline` | boolean | Display prompt character on a separate line. | `false` |### Misc
| Variable | Type | Description | Default |
| ------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------ | ------- |
| `fish_prompt_pwd_dir_length` | numeric | The number of characters to display when path shortening. Set it to `0` to display only the topmost (current) directory. | `1` |
| `hydro_ignored_git_paths` | strings | Space separated list of paths where no git info should be displayed. | `""` |
| `hydro_cmd_duration_threshold` | numeric | Minimum command duration, in milliseconds, after which command duration is displayed. | `1000` |## License
[MIT](LICENSE.md)