Package: sensible-utils Version: 0.0.9 Severity: wishlist Tags: patch Hi,
on my system (without nano installed): $ select-editor Select an editor. To change later, run 'select-editor'. 1. /bin/ed 2. /usr/bin/mcedit 3. /usr/bin/vim.basic 4. /usr/bin/vim.nox Choose 1-4 []: As select-editor seems to be specifically catered for the need of "newbies" I wonder a bit why the first suggestion it made was 'ed' which is probably the worst choice out of all the possible editors (at least for me) … The problem is that update-alternatives seems to be sorting the list internally from worst to best – priority wise –, but as a casual user, I guess I would expect the list to be ordered from best to worst instead. This could be easily fixed by just reversing the list now, but as the manpage doesn't mention that the list is ordered in any way my attached patch opts for assuming an unordered list and parses query instead with the added benefit of dropping editors with a priority below zero entirely as I assume everyone who is able to operate such an editor is not using select-editor to begin with (but if you disagree thats fine with me as well and easy to undo). (The patch is written for minimal interference with the current code in "verbose" shell, I guess some shell/sed/awk/perl-wizard could do better) Best regards David Kalnischkies
sensible-utils-priority-sort-for-editors.patch
Description: Binary data

