1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

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

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");