[__sensible_editor] List available editors when an incorrect one is provided

This commit is contained in:
Dennis Camera 2019-10-13 10:13:20 +02:00
parent f782a85470
commit 00dd16d7c3

View file

@ -28,7 +28,10 @@ die() {
}
editor_missing() { die "Editor '$1' is missing on the target system."; }
editor_no_alternative() { die "Editor '$1' is not in the alternatives list of the target system."; }
editor_no_alternative() {
die "Editor '$1' is not in the alternatives list of the target system." \
"$(test "${editors}" && echo "\nPlease choose one of:\n\n${editors}")"
}
case $("${__explorer}/os")
@ -63,7 +66,7 @@ in
esac
if $has_alternatives && test "$(echo "${editors}" | wc -l)" -gt 0
if $has_alternatives && test -n "${editors}"
then
IFS='
'