From 77defc5e24a253206ef12ad6c8b61164a4e7b0c4 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Thu, 3 Nov 2016 08:26:10 +0100 Subject: [PATCH] Add suggestion to use nano(1) if installed. --- build-aux/ports.conf | 2 +- utils/command-not-found.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build-aux/ports.conf b/build-aux/ports.conf index 4790087a..0b974251 100644 --- a/build-aux/ports.conf +++ b/build-aux/ports.conf @@ -1,3 +1,3 @@ set_minimal="cut dash e2fsprogs grep grub mdocml sed xargs" -set_basic="$set_minimal binutils bison bzip2 diffutils flex gawk gcc git gzip libcurses libstdc++ make patch pkg-config tar vim xz xorriso" +set_basic="$set_minimal binutils bison bzip2 diffutils ed flex gawk gcc git gzip libcurses libstdc++ nano make patch pkg-config tar vim xz xorriso" sets="basic minimal" diff --git a/utils/command-not-found.c b/utils/command-not-found.c index 7cd9e864..194f43b2 100644 --- a/utils/command-not-found.c +++ b/utils/command-not-found.c @@ -30,6 +30,8 @@ void suggest_editor(const char* 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/nano", X_OK) == 0 ) + fprintf(stderr, " Command 'nano' from package 'nano'\n"); if ( access("/bin/vim", X_OK) == 0 ) fprintf(stderr, " Command 'vim' from package 'vim'\n"); }