From 36b608417b12c5cbd3f7769f13083c8d2757bbf5 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Thu, 18 May 2017 22:19:35 +0100 Subject: [PATCH] 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 --- login-utils/chfn.c | 1 + 1 file changed, 1 insertion(+) 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) -- 2.47.2