[__sensible_editor] List available editors when an incorrect one is provided
This commit is contained in:
parent
f782a85470
commit
00dd16d7c3
1 changed files with 5 additions and 2 deletions
|
@ -28,7 +28,10 @@ die() {
|
||||||
}
|
}
|
||||||
|
|
||||||
editor_missing() { die "Editor '$1' is missing on the target system."; }
|
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")
|
case $("${__explorer}/os")
|
||||||
|
@ -63,7 +66,7 @@ in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
if $has_alternatives && test "$(echo "${editors}" | wc -l)" -gt 0
|
if $has_alternatives && test -n "${editors}"
|
||||||
then
|
then
|
||||||
IFS='
|
IFS='
|
||||||
'
|
'
|
||||||
|
|
Loading…
Reference in a new issue