Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Add Starship plugin #25

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ const plugin: Fig.Plugin = {
displayName: "My New Plugin",
github: "withfig/my-new-plugin",
description: "A one-line description of what this plugin does",
screenshots: ["images/example.png", "images/another-example.png"]
screenshots: ["images/example.png", "images/another-example.png"],
shells: ["zsh"],

authors: [ { name: "Fig", twitter: "@fig", github: "withfig"}]

/* ... */
/* ... */
}
export default plugin;
```
Expand Down
126 changes: 126 additions & 0 deletions plugins/starship/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<p align="center">
<img
width="400"
src="https://raw.githubusercontent.com/starship/starship/master/media/logo.png"
alt="Starship – Cross-shell prompt"
/>
</p>

<p align="center">
<a href="https://github.com/starship/starship/actions"
><img
src="https://img.shields.io/github/workflow/status/starship/starship/Main workflow/master?label=workflow&style=flat-square"
alt="GitHub Actions workflow status"
/></a>
<a href="https://crates.io/crates/starship"
><img
src="https://img.shields.io/crates/v/starship?style=flat-square"
alt="Crates.io version"
/></a>
<a href="https://repology.org/project/starship/versions"
><img
src="https://img.shields.io/repology/repositories/starship?label=in%20repositories&style=flat-square"
alt="Packaging status"/></a
><br />
<a href="https://discord.gg/starship"
><img
src="https://img.shields.io/discord/567163873606500352?label=discord&logoColor=white&style=flat-square"
alt="Chat on Discord"
/></a>
<a href="https://twitter.com/StarshipPrompt"
><img
src="https://img.shields.io/badge/twitter-@StarshipPrompt-1DA1F3?style=flat-square"
alt="Follow @StarshipPrompt on Twitter"
/></a>
</p>

<p align="center">
<a href="https://starship.rs">Website</a>
·
<a href="#🚀-installation">Installation</a>
·
<a href="https://starship.rs/config/">Configuration</a>
</p>


[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)

<h1></h1>

<img
src="https://raw.githubusercontent.com/starship/starship/master/media/demo.gif"
alt="Starship with iTerm2 and the Snazzy theme"
width="50%"
align="right"
/>

**The minimal, blazing-fast, and infinitely customizable prompt for any shell!**

- **Fast:** it's fast – _really really_ fast! 🚀
- **Customizable:** configure every aspect of your prompt.
- **Universal:** works on any shell, on any operating system.
- **Intelligent:** shows relevant information at a glance.
- **Feature rich:** support for all your favorite tools.
- **Easy:** quick to install – start using it in minutes.

<p align="center">
<a href="https://starship.rs/config/"><strong>Explore the Starship docs&nbsp;&nbsp;▶</strong></a>
</p>

## 🔧 Configuration

Start a new shell instance, and you should see your beautiful new shell prompt.
If you're happy with the defaults, enjoy!

If you're looking to further customize Starship:

- **[Configuration](https://starship.rs/config/)** – learn how to configure Starship to tweak your prompt to your liking

- **[Presets](https://starship.rs/presets/)** – get inspired by the pre-built configuration of others

## 🤝 Contributing

We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/🌱%20good%20first%20issue).

If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).

If you are interested in helping contribute to starship, please take a look at our [Contributing Guide](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Also, feel free to drop into our [Discord server](https://discord.gg/8Jzqu3T) and say hi. 👋

## 💭 Inspired By

Please check out these previous works that helped inspire the creation of starship. 🙏

- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – A ZSH prompt for astronauts.

- **[denysdovhan/robbyrussell-node](https://github.com/denysdovhan/robbyrussell-node)** – Cross-shell robbyrussell theme written in JavaScript.

- **[reujab/silver](https://github.com/reujab/silver)** – A cross-shell customizable powerline-like prompt with icons.

<p align="center">
<br>
<img width="100" src="https://raw.githubusercontent.com/starship/starship/master/media/icon.png" alt="Starship rocket icon">
</p>

## 📝 License

Copyright © 2019-present, [Starship Contributors](https://github.com/starship/starship/graphs/contributors).<br>
This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE) licensed.

[alpine linux packages]: https://pkgs.alpinelinux.org/packages?name=starship
[arch linux community]: https://archlinux.org/packages/community/x86_64/starship
[chocolatey]: https://community.chocolatey.org/packages/starship
[conda-forge]: https://anaconda.org/conda-forge/starship
[copr]: https://copr.fedorainfracloud.org/coprs/atim/starship
[crates.io]: https://crates.io/crates/starship
[fedora packages]: https://src.fedoraproject.org/rpms/rust-starship
[freshports]: https://www.freshports.org/shells/starship
[gentoo packages]: https://packages.gentoo.org/packages/app-shells/starship
[linuxbrew]: https://formulae.brew.sh/formula/starship
[homebrew]: https://formulae.brew.sh/formula/starship
[macports]: https://ports.macports.org/port/starship
[nixpkgs]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/starship/default.nix
[pkgsrc]: https://pkgsrc.se/shells/starship
[scoop]: https://github.com/ScoopInstaller/Main/blob/master/bucket/starship.json
[snapcraft]: https://snapcraft.io/starship
[termux]: https://github.com/termux/termux-packages/tree/master/packages/starship
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship
Binary file added plugins/starship/images/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions plugins/starship/images/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions plugins/starship/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
const plugin: Fig.Plugin = {
name: "starship",
displayName: "Starship",
github: "starship/starship",
description:
"The minimal, blazing-fast, and infinitely customizable prompt for any shell!",
icon: "images/icon.svg",
screenshots: ["images/demo.gif"],
site: "https://starship.rs",
docs: "https://starship.rs/config/",
twitter: "StarshipPrompt",
license: ["ISC"],
authors: [{ name: "Matan Kushner", twitter: "@matchai", github: "matchai" }],
shells: ["bash", "zsh", "fish"],
categories: ["Prompt"],

installation: {
origin: "github",
onInstall: {
command: [
"curl -sS https://starship.rs/install.sh | sh -s -- --yes --bin-dir=$HOME/.local/bin",
],
check: {
commandExists: ["starship"],
commandOutput: [
{
command: "starship module character",
output: "[1;32m❯ ",
},
],
},
},
onUninstall: {
file: ["~/.local/bin/starship"],
},
bash: {
postScript: 'eval "$(starship init bash)"',
},
fish: {
postScript: "starship init fish | source",
},
zsh: {
postScript: 'eval "$(starship init zsh)"',
},
},
};
export default plugin;