Starship: Implement the prompt segment for Rust version (🦀)

Created on 18 Apr 2019  ·  3Comments  ·  Source: starship/starship

Feature Details

Implement the prompt segment containing the currently running Rust version.
Instead of the 𝗥 symbol used in spaceship, I suggest we use the 🦀 emoji instead, as is planned in spaceship v4: https://github.com/denysdovhan/spaceship-prompt/pull/516

Should show if:

  • rustc is available as a command
  • The current directory contains

    • Cargo.toml

    • *.rs

Implementation

This should be implemented similarly to the Node version section:
https://github.com/starship/starship/blob/d620f9116b2b342ff22978ae87a78cdfccefb0de/src/modules/nodejs.rs

The implementation used in spaceship is a good reference to have:
https://github.com/denysdovhan/spaceship-prompt/blob/d9f25e14e7bec4bef223fd8a9151d40b8aa868fa/sections/rust.zsh

✨ enhancement 🌱 good first issue

Most helpful comment

I would be happy to jump on this guy if thats cool with everyone!

All 3 comments

+1 for Rust emoji. 🦀

I would be happy to jump on this guy if thats cool with everyone!

Absolutely! It's all yours. 😄
As a heads up, the current architecture isn't set in stone. I'm open to suggestions on how we can better implement segments.

Was this page helpful?
0 / 5 - 0 ratings