Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Rotate shell words widget

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

I thought about it as an extension of transpose-words, which I use
instead of Alt-b pressed once. Now I see transpose-words can be used
to e.g. revert "mv" command by doing opposite rename (not that I
didn't use it that way). Well, I always preferred transposing than
Alt-b-jumping and cursor keys. Careful positioning with Alt-b and
cursor keys, and then Ctrl-E to continue at the end, I don't like it.

> 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)?

I'm not fully following this, maybe an example? Seems sophisticated, though.

Best regards,
Sebastian Gniazdowski

Messages sorted by: Reverse Date, Date, Thread, Author