Comments (11)
If every module is also given a description
value, I think it would be pretty easy to print the module and its associated description with some small modifications to print::prompt
as it is.
starship on master is 📦 v0.8.7 via 🦀 v1.36.0
❯ starship explainer
Here is a breakdown of your prompt:
starship - Your current working directory
master - The active git branch
📦 v0.8.7 - The package version of the current directory's project
🦀 v1.36.0 - The current Rust version
We can add some custom logic in module files to add some complexity to the explainer. For instance, if it's a Rust package rather than a Node.js project, the explainer can say so. To start off, this could certainly be static.
from starship.
That makes sense.
One thing is that for modules like git, that can have a lot of symbols attachted to it, the explanation might grow quite a bit and running starship explainer
and having print out stuff related to all of the modules at once might be too much.
Maybe having something like starship explain current
where it would do that and starship explain module_name
where it could list every possibility.
from starship.
Well I think the way to handle that would be to only have it explain all the individual symbols at higher verbosity levels, or if you pass in an individual module name (which is a really nice idea, by the way). So if I do starship explainer
I would just get a thing telling me this is the git statusline, and if I run starship explainer git
or starship explainer -vv
I would get an explanation of each symbol.
from starship.
Though honestly, let's just start off getting the level-zero explainer
command into the source tree, and then we can go wild afterwards :D
from starship.
I had originally envisioned adding a little logic to each module so that it could explain why it chose to display what it did...but that seems pretty rough to implement up-front.
What might be a nicer design is to support increasing verbosity flags like ripgrep
does, so starship explainer
gives you just the static text descriptions, starship explainer -v
gives you the custom descriptions generated by each module, and starship explainer -vv
might give you logic for why modules aren't being displayed as well.
I think just printing the Features section is going to be a little barebones, but adapting the descriptions in there to the zeroeth verbosity level might work (e.g. what matchai had, but borrowing from the Features section for the description strings)
from starship.
@AZanellato If you want to work on this, go for it!
from starship.
This would be an amazing feature to have! Great thinking @chipbuster!
I'll try to give this a go!
from starship.
This may not be a complete substitute to an explainer, but I was planning to eventually have starship generate a starship.toml
containing the default configuration if the user didn't have one already made. This would be able to be used as an index.
That said, I definitely think a starship explain
command would be great to have!
from starship.
I would be happy to do this if @johnletey does not mind. I was thinking a first quick win would be to simply print the #Features
section of the README. What do you guys think?
from starship.
That said, feel free to tackle it @AZanellato if @johnletey isn't actively working on it!
from starship.
I will try to have something for next week! 😄
from starship.
Related Issues (20)
- Irrelevant single character change in pyvenv.cfg changes the prompt displayed with the variable ($virtualenv) for Python
- nspawn wrongly detected as OCI HOT 5
- Update `git_metrics` example to work properly in clean repo
- Color on macOS is not correct HOT 1
- Conda section not using assigned color HOT 1
- The starship won't work if not commenting or deleting #Use manjaro zsh prompt portion in the .zshrc file. HOT 2
- Starship stopped to worked in WSL mode after connecting with VSCode HOT 1
- Installing starship on a QNAP NAS not working HOT 1
- Separators between command output
- Add uv flag to python module
- `git_state` showing symbols outside of git repo HOT 3
- Wrong offset for Unicode characters on tab completion HOT 2
- `[character]` is always `success_symbol` HOT 1
- Post Prompt function
- Failed to detect Linux OS
- 404 on the site
- Custom modules clearing the prompt entirely in fish HOT 2
- Support for Clink Async Prompt update
- Kubernetes module triggers without env vars HOT 3
- Conda module: directory truncation does not work on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starship.