Snippets - persist state of "Wait for shell prompt before pasting each line"?

40 views
Skip to first unread message

Larry Azlin

unread,
Jun 26, 2025, 12:39:54 AMJun 26
to iterm2-discuss
Because I'm using xonsh, or perhaps because my configuration of shell integration isn't quite right, I need to turn this check-box off every time before I paste a snippet (otherwise, the contents show up twice in the terminal, and I have to press Enter twice to get back to a prompt).  Is there any way for me to configure this to permanently default to off?

iTerm2 3.5.14.  macOS 15.5

George Nachman

unread,
Jul 3, 2025, 12:30:39 AMJul 3
to iterm2-...@googlegroups.com
This is controlled by the advanced setting "Should Advanced Paste automatically enable “Wait for shell prompt before pasting each line” by default when shell integration is detected"

On Jun 22, 2025 at 3:51:35 PM, Larry Azlin <la...@azlin.com> wrote:
Because I'm using xonsh, or perhaps because my configuration of shell integration isn't quite right, I need to turn this check-box off every time before I paste a snippet (otherwise, the contents show up twice in the terminal, and I have to press Enter twice to get back to a prompt).  Is there any way for me to configure this to permanently default to off?

iTerm2 3.5.14.  macOS 15.5

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iterm2-discuss/8a753a2a-7034-4dd5-a61d-cb8c482ef875n%40googlegroups.com.

Larry Azlin

unread,
Jul 5, 2025, 2:48:20 PMJul 5
to iterm2-discuss
Thanks.  I've done that now, and the checkbox does stay off.  And if I hit the paste button from that dialog, it works great.  However, if I double-click the snippet, I'm still getting extra lines and have to press Enter twice.
Here's the snippet, pasted correctly:
def allPi():
   for Pi in $ALLPI.split( ' ' ):
       doit( Pi )
and here's what I get when I double-click the snippet:
def allPi():
    for Pi in $ALLPI.split( ' ' ):
       doit( Pi )

    for Pi in $ALLPI.split( ' ' ):

       doit( Pi )

George Nachman

unread,
Jul 11, 2025, 2:12:13 PMJul 11
to iterm2-...@googlegroups.com
Can you send me a debug log that reproduces the double click issue? I’m not getting it locally, but maybe I’m doing something different. Instructions are here: https://iterm2.com/debuglog

Larry Azlin

unread,
Jul 12, 2025, 9:25:35 PMJul 12
to iterm2-...@googlegroups.com
attached.   Thanks for the help!

Cheers!
Larry
You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/w9ITYIlPJtM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iterm2-discuss/CAB5RqokBZP_xUP1_Zm%2BxtKpPEumeB4MZcxB4kY8NqpLUewTCyg%40mail.gmail.com.
debuglog.tar.gz

George Nachman

unread,
Jul 20, 2025, 1:37:25 PMJul 20
to iterm2-...@googlegroups.com
The logic is that if shell integration was ever used in a session and you are not presently at a command prompt, then “wait for shell prompt before pasting each line” will be on by default.

You can make it default to off by toggling Settings > Advanced > Should Advanced Paste automatically enable “Wait for shell prompt before pasting each line” by default when shell integration is detected?

On Jun 22, 2025 at 3:51:35 PM, Larry Azlin <la...@azlin.com> wrote:
Because I'm using xonsh, or perhaps because my configuration of shell integration isn't quite right, I need to turn this check-box off every time before I paste a snippet (otherwise, the contents show up twice in the terminal, and I have to press Enter twice to get back to a prompt).  Is there any way for me to configure this to permanently default to off?

iTerm2 3.5.14.  macOS 15.5

--
Reply all
Reply to author
Forward
0 new messages