feat: kb article about starship prompt

This commit is contained in:
Michele Cereda
2024-01-14 01:33:20 +01:00
parent c453e090c0
commit 9f63e60312
3 changed files with 118 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ The friendly interactive shell.
1. [TL;DR](#tldr)
1. [Configuration](#configuration)
1. [Prompt](#prompt)
1. [Further readings](#further-readings)
1. [Sources](#sources)
@@ -44,11 +45,17 @@ end
`fish` offers a web-based configuration interface. Open it executing `fish_config`.
## Prompt
See [Starship] or Tide.
## Further readings
- [Website]
- [`bash`][bash]
- [`zsh`][zsh]
- [Starship] (prompt)
- [Oh My Fish][oh-my-fish]
## Sources
@@ -66,6 +73,8 @@ All the references in the [further readings] section, plus the following:
<!-- Knowledge base -->
[bash]: bash.md
[oh-my-fish]: https://github.com/oh-my-fish/oh-my-fish
[starship]: starship.md
[zsh]: zsh.md
<!-- Files -->

View File

@@ -0,0 +1,37 @@
# Nerd fonts
1. [TL;DR](#tldr)
1. [Further readings](#further-readings)
1. [Sources](#sources)
## TL;DR
```sh
# Installation.
brew tap 'homebrew/cask-fonts' && brew install 'font-hack-nerd-font'
```
## Further readings
- [Website]
## Sources
All the references in the [further readings] section, plus the following:
- [Github]
<!--
References
-->
<!-- In-article sections -->
[further readings]: #further-readings
<!-- Knowledge base -->
<!-- Files -->
<!-- Upstream -->
[github]: https://github.com/ryanoasis/nerd-fonts
[website]: https://www.nerdfonts.com/
<!-- Others -->

View File

@@ -0,0 +1,72 @@
# Starship
Fast and customizable prompt for most shells.
1. [TL;DR](#tldr)
1. [Configuration](#configuration)
1. [Further readings](#further-readings)
1. [Sources](#sources)
## TL;DR
```sh
# Installation.
brew install 'starship'
zypper in 'starship'
# Start when the shell starts.
eval "$(starship init bash)" | tee -a ~'/.bashrc'
echo 'starship init fish | source' | tee -a ~'/.config/fish/config.fish'
eval "$(starship init zsh)" | tee -a ~'/.zshrc'
# Initialize starship configuration.
mkdir -p ~'/.config' && touch ~'/.config/starship.toml'
# List available presets (prompt styles).
starship preset -l
```
## Configuration
```sh
# ~/.config/starship.toml
# Get editor completions based on the config schema.
"$schema" = 'https://starship.rs/config-schema.json'
# Replace the default '' symbol in the prompt with '$'.
# The '$' character needs to be escaped.
[character]
success_symbol = '[\$](bold green)'
```
## Further readings
- [Website]
- [Nerd fonts]
## Sources
All the references in the [further readings] section, plus the following:
- [Github]
<!--
References
-->
<!-- In-article sections -->
[further readings]: #further-readings
<!-- Knowledge base -->
[bash]: bash.md
[fish]: fish.md
[nerd fonts]: nerd%20fonts.md
[zsh]: zsh.md
<!-- Files -->
<!-- Upstream -->
[github]: https://github.com/starship/starship
[website]: https://starship.rs/
<!-- Others -->