-
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
fish_config should have a text UI #3625
Comments
Patches are welcomed. It's a small project with just a handful of regular committers. So if someone like yourself, @vbextreme, are passionate about improving fish in some way we'd love to work with you to make that happen. Since we already have a dependency on python, and have no plans to remove that dependency, the natural place to implement this capability is in the share/tools/web_config/webconfig.py program (or a fork of it). Then modify the |
thanks for the information. |
I have the same issue as @vbextreme – running Fish on a server. What I think would be already useful enough is if |
A different solution to the same problem is also being discussed in bug #1916. |
I predict issue #1916 won't be implemented anytime soon. Security is hard. Also, having a curses based solution has the advantage that it's running inside your terminal so accurately displaying colors, especially how they look given the terminals background color, becomes trivial. Personally I wish the person who implemented the web UI had instead spent the time creating a curses based UI. |
Personally, I agree. But I see how having docs and settings in browser does make it more appealing to the modern-day crowd, so I don’t see it going away any time soon. Having a good ncurses option for A(n interim) lighter idea still might be to just have a CLI command to select (maybe even preview) prompts. |
I've actually tried to do something like that. It'd be used like One issue there is doing it without any accidental side-effects - you don't want previewing a prompt to change any variable in your running shell. That's easy enough to do for ours - we only set local or global variables, so just running it in a new fish process works. In future I'd like to extend this to a "prompts" directory so you can add to the samples, that would make it a bit trickier (though you'd need to "audit" them anyway, since these files can contain arbitrary code). There's also the issue of supporting a set of both left and right prompts - one possible solution is to use one directory per sample "theme", so we'd have a "sorin/" directory with a "fish_prompt.fish" and a "fish_right_prompt.fish" file. This is also more easily extendable to other functions (like "fish_greeting" and "fish_mode_prompt"), and would even allow using e.g. git-submodule. |
You could simply start a new
I don’t follow how this is an issue, nor where the |
That's just what I did.
The "sorin" prompt contains both a Though I explained that wrong (coffee hadn't taken effect yet, I guess) - the issue isn't with those two functions since we can just handle them, the issue is actually with arbitrary helper functions and code outside of any function (e.g to set cached variables). Though we could just copy the entire file to fish_prompt.fish (which wouldn't be as clean as I'd like). Anyway, all that stuff is also an issue with fish_config, so we can also handle it later. I'll play around with this a bit more to figure out what it should be able to do and how it should work when setting a prompt. |
Hehe, tea hasn’t kicked in here yet either 😸 🍵
That makes sense. I think if a CLI command for the normal/left-hand prompt can be implemented, that would already be of great help for most users who don’t use a DE/WM. Later we can extend it to also manage the right-hand prompt and seeing as this is an issue also with
You rock! I’m happy to test it, if you have anything public yet. |
Are there no further updates on this matter? |
Nope. I haven't been working on this. I'm reasonably certain what would roughly be required:
If anyone wants to pick it up, feel free to do so! I haven't had as much time to work on fish as I'd like. |
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 names - `prompt show` demos the available sample prompts - `prompt choose` sources a prompt - `prompt save` makes the choice permanent Part of fish-shell#3625. TODO: This does not currently show the right prompt, which is awkward to do because we'd have to move it to the right.
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 names - `prompt show` demos the available sample prompts - `prompt choose` sources a prompt - `prompt save` makes the choice permanent Part of fish-shell#3625. TODO: This does not currently show the right prompt, which is awkward to do because we'd have to move it to the right.
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 names - `prompt show` demos the available sample prompts - `prompt choose` sources a prompt - `prompt save` makes the choice permanent Part of fish-shell#3625. TODO: This does not currently show the right prompt, which is awkward to do because we'd have to move it to the right.
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 names - `prompt show` demos the available sample prompts - `prompt choose` sources a prompt - `prompt save` makes the choice permanent Part of fish-shell#3625. TODO: This does not currently show the right prompt, which is awkward to do because we'd have to move it to the right.
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.
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 #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.
Okay, with #8132 (themes) and #7958 (prompts) done and providing a CLI to select these things, I'm closing this. The rest is already available - you can alter history with |
fish implements fish_config command that lets you view and select, but not editing, configurations.
It looks very cute, but to create a web server and then open a web browser to display the configurations seem a choice a little absurd.
I was expecting something more consistent as a classic ncurses menus, this would also permit to change configurations via tty, which is now unusable.
The text was updated successfully, but these errors were encountered: