From 6d7508b3d52781a3f8170a4257c65e2de176cc68 Mon Sep 17 00:00:00 2001 From: Nico Sallembien Date: Thu, 1 Apr 2010 11:03:53 -0700 Subject: [PATCH] Allow 'y' as a valid response when confirming identity I prefer having to type only one character rather than all three, and it seems like other confirmation prompts use the same style. --- subcmds/init.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subcmds/init.py b/subcmds/init.py index 75a58f11..4023ab6d 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -167,8 +167,9 @@ to update the working directory files. print '' print 'Your identity is: %s <%s>' % (name, email) - sys.stdout.write('is this correct [yes/no]? ') - if 'yes' == sys.stdin.readline().strip(): + sys.stdout.write('is this correct [y/n]? ') + a = sys.stdin.readline().strip() + if a in ('yes', 'y', 't', 'true'): break if name != mp.UserName: