Am I misunderstanding Captured Output?

487 views
Skip to first unread message

Barry MacKichan

unread,
Aug 8, 2016, 6:10:52 PM8/8/16
to iterm2-discuss
I have two triggers in my Profile.

One uses the regular expression:

([/a-zA-Z0-9.]+:\d+)(: )?(error): .*$ and the action is Highlight Text with yellow text and a black background.

It does just fine coloring a line like
/Users/user/src/mozilla/editor/libeditor/msi/msiEditor.cpp:85: error: expected initializer before ‘instanceCounter’
when I remove a brace from some source code.

The second trigger uses the same regular expression and Capture Output as the action. Nothing shows up in the Toolbelt. I have 'Captured Output' checked in the Toolbelt menu. I've also tried various parameters such as 'subs \1' where subl is the command line start for Sublime Text 3.

Any tips? Are there any examples for using Captured Output other than the iTerm documentation.

--Barry

Barry MacKichan

unread,
Aug 8, 2016, 7:19:30 PM8/8/16
to iterm2-discuss
If the regular expression is 'JavaScript strict warning:', I do get Captured Output (the action is 'echo \0'). If the regular expression is the one in the original post, I get nothing, even through the RE works for Highlight Text.

George Nachman

unread,
Aug 10, 2016, 2:04:17 PM8/10/16
to iterm2-...@googlegroups.com
Make sure you have shell integration installed. Captured Output is tied into command history, since captured output is associated with the command that generated it.

--
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-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Barry MacKichan

unread,
Aug 15, 2016, 11:48:31 AM8/15/16
to iterm2-discuss, gnac...@llamas.org
That doesn't seem to be it.
1. "echo $ITERM_SHELL_INTEGRATION_INSTALLED" produces 'Yes'
2. Captured Output is working with the expression 'JavaScript strict warning:', but not with some other RegExes.
3. I reinstalled shell integration again anyway, and nothing changed.

--Barry
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.

George Nachman

unread,
Aug 15, 2016, 12:34:30 PM8/15/16
to Barry MacKichan, iterm2-discuss
Are you getting the blue arrow to the left of your command prompt? Perhaps shell integration is installed but isn't working properly because of other stuff in your shell.

Inline image 1

Barry MacKichan

unread,
Aug 17, 2016, 2:48:41 PM8/17/16
to iterm2-discuss
George found what my problem was. The Captured Output was failing on a very long make. Increasing the scroll back line count fixed it. 
-Barry


On Monday, August 8, 2016 at 4:10:52 PM UTC-6, Barry MacKichan wrote:
Reply all
Reply to author
Forward
0 new messages