From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16403 invoked by alias); 13 May 2016 09:23:11 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21556 Received: (qmail 4912 invoked from network); 13 May 2016 09:23:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=ZooRaTNZ9LXmRQTS512IhbMmRHG6otSYBS5DnCJMxBM=; b=yWvG8qzFnfMvis8NGqHmIqcQlEnN3alyzWDwkXnry3Gxj14EC/rFPlyj7W1I8PCikT TX45pzjRiPLjl8aFLyL5i+yLsFjHtFeVzhLHqbGTg82p04oltTkeYi0tm8fQbhnLMTuv b/wYMThtcTVhBj0W7GvWd2lZ9JUFgrF/6tbBaeQIp6B0oFAxwgX6XnwjnqA49o94f31o Ac/PpSW/Lm7QV/xFM8JV7V3P947/5DeHp9teXTv0IXWBqcOvtmLTF5EM+Vh9VHTpmLvb 3nIDwYcs8xTPelgzcb2jbn7GYD8WmzFXuh2GvnudwlVC1ryyBd7VSqRdbO0yHcmbx4O+ mtBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=ZooRaTNZ9LXmRQTS512IhbMmRHG6otSYBS5DnCJMxBM=; b=TdjNKthma4U+VUSVryFwTmCBtDR8nRjKlL9biuuT5CL12A25C4zHz4ploCifvOBpyk prA/0vP86Gaia++/0X8tsgXKiOAcdckpRNVDFdSh66aoU4Q0ZCrwajesCYzcBLRbCpKK rM/L17PQ85gocbJSZjfqOUCZZODZ0iL29O6/AjInWm5Jj8BzvPuJ7W4uRW0QCS6/xNfh 2/DJ1YaZL4n2ht/SnVrnJvcRqkwETngYlwOrw9B0fBTwP+MWCxsJFx9aKspTfDFtZ8y3 e9TBcSF5TuXPh+6nJkrykIVuT8yKcdI3TQReizV+b89QvMqiqcDfBQy4URmXB28bJQXa OHoA== X-Gm-Message-State: AOPr4FXXQLD3CtzPuY7Ti++j9KsuQJpC/DntT29yhaFy64bCGuvga4Fi7WwtZgoHH7CbcEDH1tzAQQTNM9sGaQ== MIME-Version: 1.0 X-Received: by 10.25.83.10 with SMTP id h10mr5329777lfb.39.1463131383211; Fri, 13 May 2016 02:23:03 -0700 (PDT) In-Reply-To: References: <160511142150.ZM9063@torch.brasslantern.com> Date: Fri, 13 May 2016 02:23:03 -0700 Message-ID: Subject: Re: Rotate shell words widget From: Bart Schaefer To: Sebastian Gniazdowski Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Thu, May 12, 2016 at 12:07 AM, Sebastian Gniazdowski wrote: > On 11 May 2016 at 23:21, Bart Schaefer wrote: >> What common usage did you have in mind for this? >> >> I presume rotate acts on $RBUFFER and rotate-backwards works on $LBUFFER >> (approximately). > > I wasn't enough specific again? It rotates words in command line not > letters in words. No, you were quite clear that it acted on words, that wasn't my question. I used RBUFFER and LBUFFER as shorthand for "words found after the cursor" and "words found before the cursor." Now that you've said this ... > The usage is then I think clear, to go to some > previous word, edit it, and put it in its original place again. ... I see that the difference is whether you rotate the last word to the front or the first word to the end. But why would you rotate the words in order to edit one, rather than just move the cursor to the word you want to change? Also it looks like this always rotates all the words in the buffer, so e.g. the last word moves to command position no matter what word the cursor is on. If the reason is to be able to edit a different word, wouldn't it make more sense to move the word at the end to the cursor (or the word at the cursor to the end)? > Alternative to Alt-b in bindkey -e. I don't follow that at all. How is rotating words an alternative to moving backward by one word?