From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: Sami Kerola <kerolasa@iki.fi>
Subject: [PATCH 2/3] chfn: disable tab completion
Date: Thu, 18 May 2017 22:19:35 +0100 [thread overview]
Message-ID: <20170518211936.28153-3-kerolasa@iki.fi> (raw)
In-Reply-To: <20170518211936.28153-1-kerolasa@iki.fi>
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 <kerolasa@iki.fi>
---
login-utils/chfn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/login-utils/chfn.c b/login-utils/chfn.c
index d79a192cf..3a951a193 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.13.0
next prev parent reply other threads:[~2017-05-18 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 21:19 [PATCH 0/3] pull: rename usability and readline improvements Sami Kerola
2017-05-18 21:19 ` [PATCH 1/3] rename: make --no-act to imply --verbose Sami Kerola
2017-05-18 21:19 ` Sami Kerola [this message]
2017-05-18 21:19 ` [PATCH 3/3] chsh: make readline completion to propose valid shells Sami Kerola
2017-05-19 8:26 ` Karel Zak
2017-06-05 11:36 ` Karel Zak
2017-05-19 9:44 ` [PATCH 0/3] pull: rename usability and readline improvements Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170518211936.28153-3-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox