-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A cli prompt selector #7958
A cli prompt selector #7958
Conversation
This is rad. Name: There's only one package in Debian that has a UI: I think a bare |
The idea here is that you can use Or, like I added in above, you can just add We could add a |
share/functions/prompt.fish
Outdated
return 1 | ||
end | ||
|
||
set -l prompt_dir $__fish_data_dir/sample_prompts $__fish_data_dir/tools/web_config/sample_prompts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(note: This was added in preparation of moving the sample_prompts directory out of web_config - because it no longer is web-exclusive)
Done |
Alright, moved it over to The web-ui can be accessed via |
Alright, selecting the initial tab is broken anyway (even without this). |
It's a bit weird to *have* to fire up a browser to get fish_config to choose a prompt. So this adds a `prompt` subcommand to `fish_config`: - `fish_config prompt list` shows all the available prompt names - `fish_config prompt show` demos the available sample prompts - `fish_config prompt choose` sources a prompt - `fish_config prompt save` makes the choice permanent A bare `fish_config` or `fish_config browse` opens the web UI. Part of fish-shell#3625. TODO: This shows the right prompt on a new line. Showing it in-line is awkward to do because we'd have to move it to the right.
Alright, merged. |
It's a bit weird to have to fire up a browser to get fish_config to
choose a prompt.
So this adds
prompt
:prompt list
shows all the available prompt namesprompt show
demos the available sample promptsprompt choose
sources a promptprompt save
makes the choice permanentPart of #3625.
This means that you can e.g. pick the "informative" prompt by adding
prompt choose informative
to config.fish, and it will just alwayssource
the one from the currently installed fish (so it will update when we update the sample). This is on purpose and has basically no overhead, so it's entirely acceptable - we might even want to recommend it in the docs.TODOs:
to do because we'd have to move it to the right (and this involves width-without-color, see string pad doesn't work with escapes #7784).
prompt
, or maybe a more general "config tool"? A special mode forfish_config
, so if you dofish_config prompt
it'll run in the terminal,fish_config
will keep opening the browser?