From: Sami Kerola Date: Thu, 18 May 2017 21:19:35 +0000 (+0100) Subject: chfn: disable tab completion X-Git-Tag: v2.30-rc2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36b608417b12c5cbd3f7769f13083c8d2757bbf5;p=thirdparty%2Futil-linux.git chfn: disable tab completion The default readline tab completion that offers file listing from current directory does not make any sense in this context. Signed-off-by: Sami Kerola --- diff --git a/login-utils/chfn.c b/login-utils/chfn.c index d79a192cfc..3a951a1935 100644 --- a/login-utils/chfn.c +++ b/login-utils/chfn.c @@ -237,6 +237,7 @@ static char *ask_new_field(struct chfn_control *ctl, const char *question, printf("%s [%s]: ", question, def_val); __fpurge(stdin); #ifdef HAVE_LIBREADLINE + rl_bind_key('\t', rl_insert); if ((buf = readline(NULL)) == NULL) #else if (getline(&buf, &dummy, stdin) < 0)