Add suggestion to use ed(1) if installed.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-10-30 19:56:34 +01:00
parent d4bec88bf6
commit df0a99a2d2
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@
void suggest_editor(const char* filename)
{
fprintf(stderr, "No command '%s' found, did you mean:\n", filename);
if ( access("/bin/ed", X_OK) == 0 )
fprintf(stderr, " Command 'ed' from package 'ed'\n");
fprintf(stderr, " Command 'editor' from package 'editor'\n");
if ( access("/bin/vim", X_OK) == 0 )
fprintf(stderr, " Command 'vim' from package 'vim'\n");