zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Rotate shell words widget
Date: Fri, 13 May 2016 02:23:03 -0700	[thread overview]
Message-ID: <CAH+w=7a=n3qx3Vr3SmuU_PCadGeCSgX7vTxzhs1VcDcq0TycNw@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVCS8G9MV9LoL8Tqvz9F4ZdsrvmaGhzhjvvh8-rchiOspw@mail.gmail.com>

On Thu, May 12, 2016 at 12:07 AM, Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
> On 11 May 2016 at 23:21, Bart Schaefer <schaefer@brasslantern.com> 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?


  reply	other threads:[~2016-05-13  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11  8:39 Sebastian Gniazdowski
2016-05-11 21:21 ` Bart Schaefer
2016-05-12  7:07   ` Sebastian Gniazdowski
2016-05-13  9:23     ` Bart Schaefer [this message]
2016-05-14 21:30       ` Sebastian Gniazdowski
2016-05-14 22:41         ` René Wilhelm
2016-05-15 10:49         ` Bart Schaefer

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='CAH+w=7a=n3qx3Vr3SmuU_PCadGeCSgX7vTxzhs1VcDcq0TycNw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=sgniazdowski@gmail.com \
    --cc=zsh-users@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).