zsh-users
 help / color / mirror / code / Atom feed
* Unterminated for loop
@ 2023-06-06 18:46 Roman Perepelitsa
  2023-06-06 23:12 ` Mikael Magnusson
  0 siblings, 1 reply; 6+ messages in thread
From: Roman Perepelitsa @ 2023-06-06 18:46 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

If I type `for x;` (without the quotes) and press ENTER in an interactive
zsh, I end up in PS2. However, the exact same sequence of characters is
treated as a complete command in a script or function. Why is that?

    $ zsh -f
    % () { for x; }
    % zsh -fc 'for x;'
    % for x;
    for>

Roman.

[-- Attachment #2: Type: text/html, Size: 433 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-07 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 18:46 Unterminated for loop Roman Perepelitsa
2023-06-06 23:12 ` Mikael Magnusson
2023-06-07  2:58   ` Bart Schaefer
2023-06-07  5:43     ` Jun T
2023-06-07  8:13     ` Roman Perepelitsa
2023-06-07 15:20     ` Ray Andrews

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