Arrow navigation and backward text edition when typing Evomaintenance comment #13
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: evolix/evomaintenance#13
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Could we use "read -e" when available (e.g. in bash), instead of just read ?
Pseudo-code :
This issue is already tracked in issue #10. Let's keep talking about it over there.
Reopened since I confused #10 with this one.
Your suggestion is great and can be implemented easily without depending on an external binary such as
readline
. I hope we can fix this quickly!Possibilité de revenir en arrière dans le read du commentaire de l'Evomaintenanceto Arrow navigation and backward text edition when typing Evomaintenance commentFor the if condition, it seems that we can use the following commands to know if bash is available :
However, a better option would be to directly test the availability of "read -e" by testing the exit code of the following command :
Then, we could write (with an alias in this snippet) :
Each time I tried to find a reliable test of the running shell, I've found edge cases.
Testing for the real availability of the tool or feature we need is a way better approach.
For example, I often prefer testing for the presence of a command (eg.
command -v foo
) rather than testing if the corresponding package is installed.Anther idea proposed by Ludovic is - when available - to open vim ot the system default editor (like git commit does).
This would enable the maintener to give more info in the maintenance log if needed and would be much more user friendly than the current read command.
Having a full fledge editor when writing evomaintenance can be usefuled in some case, but would probably an hindrance to use it all the time. So having a shortcut from the read/readline input to swith to a true editor seems a good middle ground.
Or we could use the if correctly like so:
As the if conditionnal check the exit status being 0 already.