diff --git a/cdist/conf/type/__sensible_editor/explorer/editor_path b/cdist/conf/type/__sensible_editor/explorer/editor_path index b0de2f0a..b6230545 100644 --- a/cdist/conf/type/__sensible_editor/explorer/editor_path +++ b/cdist/conf/type/__sensible_editor/explorer/editor_path @@ -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=' '