improve behavior of "Always run command" in semantic history: text before click is truncated too early
By timot...@google.com on September 07, 2013 00:24 (imported from Google Code)
NOTE: originally disccussed in https://groups.google.com/forum/?fromgroups=#!topic/iterm2-discuss/Lz7mx06Bxg8
in preferences>advanced>semantic history > click on a filename referring to an existing file performs an action:
This feature is very useful, allowing me to click on files in a stacktrace (for example), and parse some custom format indicating file/line, and open in a custom editor.
Currently it provides:
\1 filename
\2 line number
\3 text before click
\4 text after click
\5 pwd
I made a custom command that parses \3 and \4 to get current directory and clicked file/line to work when the default one doesn't. It works by using a regex that finds the prompt command, that contains current directory.
However, somehow \3 is truncated, containing only a few lines (~5), so that fails when the previous prompt command is too far above. Can we either increase the text before click or set its length to the entire buffer ?