Skip to content
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

[feature] Show editor settings #430

Closed
m-ildefons opened this issue Mar 7, 2023 · 7 comments
Closed

[feature] Show editor settings #430

m-ildefons opened this issue Mar 7, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@m-ildefons
Copy link

Current state:

Default editor settings are completely ignored and it is impossible to show them in the output.

Wanted state:

On Platform that support it, e.g. Linux, FreeBSD and MacOS, the environment variables $VISUAL and $EDITOR can be queried to fetch the configured default visual and/or line editor. On modern systems where line editors are rarely used, the distinction less important. But the environment variables may still be used to communicate which editor should be referred to to programs, e.g. https://github.com/git/git/blob/master/editor.c.

Work in progress sample:
fastfetch

Why the change is sensible:

Many users of fetching programs like this and the unfortunately unmaintained neofetch are happy to show off their individual choice of software. This includes the editor, especially in case of command line editors like nano and neovim, which integrate deeply with other system programs like command line email clients, git and more via system mechanisms.
This feature would allow users to show off their choice of editor along the other system configurations like window managers, shells and terminal emulators.

@m-ildefons m-ildefons added the enhancement New feature or request label Mar 7, 2023
m-ildefons added a commit to m-ildefons/fastfetch that referenced this issue Mar 7, 2023
Add version information about the currently used editor as configured in
the `$EDITOR` environment variable to the output.

fixes: fastfetch-cli#430
Signed-off-by: Moritz Röhrich <moritz@ildefons.de>
@CarterLi
Copy link
Member

CarterLi commented Mar 8, 2023

Try fastfetch -s command --command-key Editor --command-text '$EDITOR -v | head -1'

@CarterLi
Copy link
Member

CarterLi commented Mar 8, 2023

I doubt if I want to support this. There are other settings ( eg compiler version, pager version ) that are as easy as command -v. If we add all of these, it would be boring.

@LinusDierheimer
Copy link
Collaborator

ENV vars can be read much faster than opening a shell, maybe we can do something similar to command just for env:

fastfetch -s env --env-key Editor --env-text EDITOR

Maybe a 2.0 thing.

If the version is desired, i think command is the way to go too.

@CarterLi
Copy link
Member

Please use Command module

@CarterLi CarterLi closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
@mhalano
Copy link

mhalano commented May 21, 2024

I think we could consider this. I use hyfetch and it has a module for it. I know I could just use the command module, but I think the easier the better. What do you think?

CarterLi added a commit that referenced this issue May 22, 2024
@CarterLi
Copy link
Member

Fixed in dev branch

@mhalano
Copy link

mhalano commented May 24, 2024

Tested the 2.13.2 release from Ubuntu PPA and worked better than I expected. I thought it would just have nvim but also has the version.
Thanks for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants