From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 118255255552 X-Google-Groups: supmua X-Google-Thread: 3030fda1bf,de37ab03d5293e7 X-Google-Attributes: gid3030fda1bf,domainid0,public,googlegroup X-Google-NewGroupId: yes X-Received: by 10.50.33.18 with SMTP id n18mr14150971igi.8.1411032898038; Thu, 18 Sep 2014 02:34:58 -0700 (PDT) X-BeenThere: supmua@googlegroups.com Received: by 10.50.20.199 with SMTP id p7ls1444397ige.1.gmail; Thu, 18 Sep 2014 02:34:57 -0700 (PDT) X-Received: by 10.42.70.144 with SMTP id f16mr3625666icj.8.1411032897596; Thu, 18 Sep 2014 02:34:57 -0700 (PDT) Return-Path: Received: from mout.gmx.net (mout.gmx.net. [212.227.17.21]) by gmr-mx.google.com with ESMTPS id ew8si559377vdb.1.2014.09.18.02.34.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Sep 2014 02:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.weikl@gmx.net designates 212.227.17.21 as permitted sender) client-ip=212.227.17.21; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of eric.weikl@gmx.net designates 212.227.17.21 as permitted sender) smtp.mail=eric.weikl@gmx.net Received: from localhost ([212.204.93.100]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MC7em-1XdJYW1Hiy-008sfs; Thu, 18 Sep 2014 11:34:56 +0200 Content-Type: text/plain; charset=UTF-8 From: Eric Weikl To: Ruthard Baudach Cc: supmua Subject: Re: [sup] how to write interactive hook In-reply-to: <1410717805-sup-9254@ruthard-lappi> References: <1410717805-sup-9254@ruthard-lappi> Date: Thu, 18 Sep 2014 11:34:55 +0200 Message-Id: <1411032610-sup-4800@alderaan> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:BEYTcr6EjnRt8OI7buow6+hyur2G4mtKsQ3W1LY7c8kOETiwPy3 vxB02DpN9GWI6WniSbcsC0fZYil27WWfacwvYZqVPfvIjrRybj6RxvcnRiPkx3N9Jpd+ESq Mpqq5pB1c73gBrrB8ASV3oe357MfvFsP/VHnjXm1qhpBR8C/sLBCHPudr8Jul+htgXHHYFr kYLcT+kz/dfYCDdT6yOwQ== X-UI-Out-Filterresults: notjunk:1; Hi Ruthard, On 09/14/2014 20:07:27, Ruthard Baudach wrote: > But how can I write an interactive hook? As Gaute pointed out, you can prompt the user for information using the BufferManager methods like ask_yes_no or ask_many_with_completions. I use this for a primitive follow-up hook. You can get the idea from this gist: https://gist.github.com/anonymous/b1c2beb9ccddd2787e12 It's not perfect and I'm happy if anyone has ideas for improvement, BTW :-) Cheers, Eric