Open m-ildefons opened 1 year ago
Currently, if neither $VISUAL
nor $EDITOR
is set, the code will return "command not found" when trying to run $editor_full_path
when it's empty. Can you add a null check or ignore stderr?
You can add
[[ -z "$editor_full_path" ]] && return
Hi,
thanks for pointing this out. I corrected it and also added the options to the man page.
It will still fail to execute if $VISUAL
(or $EDITOR
) is set to something that isn't executable, but that would be quite a rare misconfiguration, so I'm not sure it's worth handling this case?
Works!
It will still fail to execute if
$VISUAL
(or$EDITOR
) is set to something that isn't executable, but that would be quite a rare misconfiguration, so I'm not sure it's worth handling this case?
Yea that's fine, we can assume that EDITOR is correctly configured
Thank you for your contribution!
This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.
HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.
Read the "Running Updated Original Neofetch" section for more info!
Found another bug - when the editor doesn't support --version
option (the pico editor for example), neofetch will be stuck on this line:
And by default, macOS links nano to pico:
Therefore, I removed the version check for editor so that editors that doesn't support --version
will now be unstuck.
Display the configured editor, version and path using the $EDITOR environment variable similar to the way the shell version is displayed from the $SHELL variable.
fixes: #2270
TODO