tide/README.md

159 lines
6.3 KiB
Markdown
Raw Normal View History

2020-07-21 00:41:09 +03:00
<div align="center">
<img src="https://github.com/IlanCosman/tide/blob/assets/images/logo.svg" width="61.8%"/><br>
2020-07-21 00:41:09 +03:00
2023-07-05 06:32:07 +03:00
[![ci_badge][]][actions] [![license_badge][]][license] <!-- 0 width spaces on this line -->
2020-07-21 00:41:09 +03:00
</div>
#
2020-06-07 02:05:49 +03:00
<img src="https://github.com/IlanCosman/tide/blob/assets/images/header.png" width="50%" align="right"/>
2020-07-23 05:44:12 +03:00
2020-12-13 23:12:37 +03:00
**The ultimate Fish prompt.**
2020-04-03 02:30:40 +03:00
2021-06-16 00:37:56 +03:00
- **Out of the box:** With three compelling styles and lots of options, you can have your ready-to-run cake and customize it too.
- **Flexible:** Move content around or remove it, all without ever touching a line of code.
2021-01-13 07:09:32 +03:00
- **Extensible:** Create custom content with simple Fish functions that integrate seamlessly.
- **Fast:** Asynchronous rendering makes Tide the fastest full-featured Fish prompt.
2020-07-23 05:44:12 +03:00
<br clear="right">
2020-05-13 06:17:03 +03:00
2020-06-16 20:03:02 +03:00
## Installation
2020-04-03 02:30:40 +03:00
2020-07-29 18:40:43 +03:00
### System Requirements
2020-04-03 02:30:40 +03:00
2023-03-06 08:54:29 +03:00
- The **latest** version of [Fish][], currently 3.6.0. <sub>[Using an older version of Fish?][]</sub>
2020-07-29 17:35:37 +03:00
- A [Nerd Font][nerd fonts] installed and enabled in your terminal (for example the [recommended font](#fonts)).
2020-11-04 22:05:41 +03:00
Install with [Fisher][]:
2020-07-23 06:46:37 +03:00
```console
2021-08-12 01:03:58 +03:00
fisher install IlanCosman/tide@v5
2020-07-23 06:46:37 +03:00
```
2020-05-13 06:17:03 +03:00
2021-03-31 19:14:30 +03:00
<details>
<summary>Install manually</summary>
2021-04-12 02:09:40 +03:00
This script may not work for all use cases.
2021-03-31 19:14:30 +03:00
```fish
2021-04-12 02:09:40 +03:00
set -l _tide_tmp_dir (command mktemp -d)
curl https://codeload.github.com/ilancosman/tide/tar.gz/v5 | tar -xzC $_tide_tmp_dir
command cp -R $_tide_tmp_dir/*/{completions,conf.d,functions} $__fish_config_dir
fish_path=(status fish-path) exec $fish_path -C "emit _tide_init_install"
2021-03-31 19:14:30 +03:00
```
</details>
2020-06-16 20:03:02 +03:00
## Features
2020-05-13 06:17:03 +03:00
2020-05-20 08:14:01 +03:00
### Configuration Wizard
2020-05-20 04:08:57 +03:00
2022-03-31 18:14:28 +03:00
Run `tide configure` to open the wizard in your terminal.
2020-05-20 04:08:57 +03:00
2020-06-19 21:13:43 +03:00
![configuration_wizard][]
2020-05-20 04:08:57 +03:00
2020-07-27 04:13:01 +03:00
<br>
2020-06-10 19:18:15 +03:00
<img src="https://github.com/IlanCosman/tide/blob/assets/images/extensible.png" width="61.8%" align="right"/>
2020-12-23 02:29:21 +03:00
### Extensible
If there isn't an item that fits your needs you can make your own (and hopefully submit a pull request) or ask for it to be made by opening an issue.
<br clear="right"><br>
<img src="https://github.com/IlanCosman/tide/blob/assets/images/flexible.png" width="61.8%" align="left"/>
2020-06-10 19:18:15 +03:00
2020-07-27 04:13:01 +03:00
### Flexible
2020-06-10 19:18:15 +03:00
2020-09-17 01:00:48 +03:00
Using the [`items`][] list for each side of the prompt, you have full control of which and where prompt sections display.
2020-07-27 04:13:01 +03:00
<br clear="left"><br>
2020-12-22 06:39:43 +03:00
### Asynchronous Rendering
2020-06-16 03:52:35 +03:00
2020-12-22 06:39:43 +03:00
Tide runs everything in the background so that your prompt will always feel snappy.
2020-06-16 03:52:35 +03:00
2020-12-22 06:39:43 +03:00
![async][]
2020-06-16 03:52:35 +03:00
2020-12-23 02:29:21 +03:00
Asynchronous rendering also allows Tide to display more information than other prompts. For example, most prompts don't display the number of untracked, modified, or deleted files in a git repository because it's too slow to compute.
2020-06-16 03:52:35 +03:00
2020-12-22 06:39:43 +03:00
<br>
2020-07-27 04:13:01 +03:00
<img src="https://github.com/IlanCosman/tide/blob/assets/images/multi-line_right_prompt.png" width="61.8%" align="left"/>
2020-12-22 06:39:43 +03:00
### Multi-Line Right Prompt
> Fish can't do _that_ yet can it!
Tide is the only Fish prompt capable of displaying a multi-line right prompt. All you have to do is add the `newline` item.
2021-01-13 02:43:17 +03:00
<br clear="left">
2021-01-13 00:41:12 +03:00
### Current directory that just works
2022-03-31 18:14:28 +03:00
The current working directory is the most important part of any shell prompt. Tide highlights the critical parts and truncates with the least loss of information when horizontal space is scarce.
2021-01-13 00:41:12 +03:00
![pwd][]
2022-05-06 23:33:32 +03:00
When the full directory doesn't fit, the leftmost segment is truncated to its shortest unique prefix. In the example above, `Documents` becomes `Doc` instead of `D` because that could be confused with `Downloads`. Important segments are bold and never truncated. These include the last segment, root of a Git repository etc.
2021-01-13 00:41:12 +03:00
2021-06-16 00:45:07 +03:00
<sup>_Tip_: If you copy-paste a truncated path and hit <kbd>tab</kbd>, it will complete to the original.</sup>
2020-05-20 04:08:57 +03:00
2021-02-21 07:09:26 +03:00
## Documentation
2020-07-24 06:27:51 +03:00
2021-02-21 07:09:26 +03:00
See the [Wiki][] for documentation.
2020-07-24 06:27:51 +03:00
2020-06-16 20:03:02 +03:00
## Contributing
2020-05-31 04:03:41 +03:00
2020-07-27 04:13:01 +03:00
From the smallest typo to the largest feature, contributions of any size or experience level are welcome!
If you're interested in helping contribute to Tide, please take a look at the [Contributing Guide][].
2020-05-31 04:03:41 +03:00
2020-06-16 20:03:02 +03:00
## Fonts
2020-06-05 05:43:27 +03:00
2020-07-17 05:53:34 +03:00
### Meslo Nerd Font
2021-06-16 00:37:56 +03:00
A gorgeous monospace font designed by Jim Lyles for Bitstream, customized for Apple, enhanced by André Berg, and finally patched by Roman Perepelitsa of [Powerlevel10k][] with scripts originally developed by Ryan McIntyre of [Nerd Fonts][]. Contains all the glyphs and symbols that Tide may need. Battle-tested in dozens of different terminals on all major operating systems.
2020-06-16 20:03:02 +03:00
### Font Installation
2020-06-05 05:43:27 +03:00
Download these four ttf files:
2020-07-17 05:53:34 +03:00
- [MesloLGS NF Regular.ttf][]
- [MesloLGS NF Bold.ttf][]
- [MesloLGS NF Italic.ttf][]
- [MesloLGS NF Bold Italic.ttf][]
2020-06-05 05:43:27 +03:00
2020-07-17 06:21:09 +03:00
Open each file and click "Install". This will make the `MesloLGS NF` font available to all applications on your system. Configure your terminal to use this font.
2020-07-08 21:27:41 +03:00
## Acknowledgments
2021-06-16 00:37:56 +03:00
- [Powerlevel10k][] - Inspired Tide's creation. Because Tide aims to replicate Powerlevel10k's amazing capabilities, small sections of documentation have been borrowed when rewording the language would reduce clarity.
2020-08-19 20:35:04 +03:00
- [Starship][] - Inspired elements of Tide's documentation and community health files.
- [Spacefish][] - Inspired some of Tide's items.
2021-02-21 07:09:26 +03:00
[`items`]: https://github.com/IlanCosman/tide/wiki/Configuration#items
2020-07-17 05:53:34 +03:00
[actions]: https://github.com/IlanCosman/tide/actions
[async]: https://github.com/IlanCosman/tide/blob/assets/animations/async.gif
2020-07-12 21:12:56 +03:00
[ci_badge]: https://github.com/IlanCosman/tide/workflows/CI/badge.svg
[configuration_wizard]: https://github.com/IlanCosman/tide/blob/assets/animations/configuration_wizard.gif
2020-07-17 04:50:52 +03:00
[contributing guide]: CONTRIBUTING.md
2020-09-07 22:00:54 +03:00
[fish]: https://fishshell.com/
2020-11-04 22:05:41 +03:00
[fisher]: https://github.com/jorgebucaran/fisher
2020-07-08 21:27:41 +03:00
[license_badge]: https://img.shields.io/github/license/IlanCosman/tide
2020-09-07 22:00:54 +03:00
[license]: LICENSE.md
[meslolgs nf bold italic.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_bold_italic.ttf?raw=true
[meslolgs nf bold.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_bold.ttf?raw=true
[meslolgs nf italic.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_italic.ttf?raw=true
[meslolgs nf regular.ttf]: https://github.com/IlanCosman/tide/blob/assets/fonts/mesloLGS_NF_regular.ttf?raw=true
2020-07-17 05:53:34 +03:00
[nerd fonts]: https://github.com/ryanoasis/nerd-fonts
2020-07-08 21:27:41 +03:00
[powerlevel10k]: https://github.com/romkatv/powerlevel10k/
[pwd]: https://github.com/IlanCosman/tide/blob/assets/images/pwd.png
2020-08-19 20:35:04 +03:00
[spacefish]: https://github.com/matchai/spacefish
2020-07-23 06:46:37 +03:00
[starship]: https://github.com/starship/starship
2021-03-03 03:40:15 +03:00
[using an older version of fish?]: https://github.com/IlanCosman/tide/wiki/Fish-version-compatibility
2021-02-21 07:09:26 +03:00
[wiki]: https://github.com/IlanCosman/tide/wiki