zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: transpose-words-match (Re: New widget "transpose-segments")
Date: Tue, 12 Jan 2016 11:12:22 -0800	[thread overview]
Message-ID: <160112111222.ZM8933@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVC8F-sQxPv8bsWQw3X710n8AkNPK6AsjyAneUpDqyACsg@mail.gmail.com>

On Jan 12, 10:23am, Sebastian Gniazdowski wrote:
}
} It's interesting that insert-last-word operates on shell words
} although this is not stated in manual.

insert-last-word operates on elements of the $historywords array, so
if you setopt histlexwords then insert-last-word uses shell words,
and if you don't have that setopt then it uses space-separated words.

} > select-in-shell-word
} 
} Other lines, when ended with space, will also cause the unexpected
} behavior. I should have stated this that it's about space at the end.

Yes, sorry; that's the "in" part of select-in-shell-word.  It selects
the word under the cursor, or (what I hadn't noticed when I created
that little three-line widget) the word to the *right* of the cursor
if between words; and because of vim-ism, it does not cross newlines.
So if you're at the end of a line with whitespace it selects nothing.

} Seems that (Z:n:) would discard the new lines like
} any other white spaces and the code would be simpler.

Actually it doesn't discard them -- they are treated as a word if in
context they act as a separator.  They just aren't converted into
semicolons.

} BTW. I discovered that following multi line command can make various
} versions of zsh hang on it:
} 
[...]
} 
} Does it reproduce to you?

Hangs how?  In ZLE, or when attempting to actually execute the commands?

If the latter, can you "set -vx" to see if it's possible to tell which
line causes the problem?

If the former, you'll have to explain in more detail the steps to
reproduce, including whether it's possible to do so from "zsh -f".


  parent reply	other threads:[~2016-01-12 19:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 11:03 New widget "transpose-segments" Sebastian Gniazdowski
2016-01-09 12:19 ` Jérémie Roquet
2016-01-09 15:56   ` Sebastian Gniazdowski
2016-01-09 15:55 ` Sebastian Gniazdowski
2016-01-09 15:57   ` Sebastian Gniazdowski
2016-01-09 17:22 ` Bart Schaefer
2016-01-09 17:48   ` transpose-words-match (Re: New widget "transpose-segments") Bart Schaefer
2016-01-09 18:03     ` Sebastian Gniazdowski
2016-01-09 18:18       ` Bart Schaefer
2016-01-11 13:13         ` Sebastian Gniazdowski
2016-01-12  6:26           ` Bart Schaefer
2016-01-12  6:46             ` Bart Schaefer
2016-01-12  9:09               ` Sebastian Gniazdowski
2016-01-12  9:39                 ` Sebastian Gniazdowski
2016-01-12  9:23             ` Sebastian Gniazdowski
2016-01-12  9:38               ` Sebastian Gniazdowski
2016-01-12  9:46               ` Peter Stephenson
2016-01-12 19:12               ` Bart Schaefer [this message]
2016-01-09 17:59   ` New widget "transpose-segments" Sebastian Gniazdowski
2016-01-09 19:06     ` Sebastian Gniazdowski
2016-01-12  8:13       ` Bart Schaefer
2016-01-12  8:09     ` Bart Schaefer
2016-01-12  9:50       ` Sebastian Gniazdowski

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=160112111222.ZM8933@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).