~whereswaldon/arbor-dev#74: 
Select an editor option by default and indicate that in wisteria prompt

When choosing options in most cli programs, something is selected by default and users can just press enter. At the moment, wisteria has one editor option and it would make sense to set that as default.

Status
REPORTED
Submitter
~amolith
Assigned to
No-one
Submitted
9 months ago
Updated
9 months ago
Labels
feature wisteria

~whereswaldon 9 months ago

So you're right that it would make sense to just accept the only option when you hit enter, it doesn't really just have one option.

If you look here, you can see that it actually searches for a known set of editor commands and displays any of them that it discovers on your local system.

~amolith 9 months ago

I didn't make clear what I meant. Yes, at the moment it only has one so pressing enter should use it. When it has multiple, however, one of them should be made default and it would use whatever terminal is currently in use but list others if desired. For example running wisteria is GNOME Terminal should put GNOME Terminal on top and pressing enter would choose that. Running wisteria in kitty should put kitty on top and pressing enter would choose that instead.

~whereswaldon 9 months ago

On December 8, 2019 8:16:04 PM EST, ~amolith outgoing@sr.ht wrote:

I didn't make clear what I meant. Yes, at the moment it only has one so

pressing enter should use it. When it has multiple, however, one of them should be made default and it would use whatever terminal is currently in use but list others if desired. For example running wisteria is GNOME Terminal should put GNOME Terminal on top and pressing enter would choose that. Running wisteria in kitty should put kitty on top and pressing enter would choose that instead.

I agree with you in spirit, but I know of no reliable way to look up the terminal emulator that they current program is running within. It seems so simple, but there is no convention for it. $TERM describes what capabilities it supports, but many terminals just claim to be xterm even when they aren't.

If we assume that it's not possible to determine the terminal emulator reliably in an automated way, what's the next best option you can think of?

Register here or Log in to comment, or comment via email.