[SVN] REQ: commands choosing output
Allan Odgaard
allan at macromates.com
Sun Feb 20 07:38:08 UTC 2005
On Feb 19, 2005, at 19:02, Eric Hsu wrote:
> Perhaps a future TM could let commands set $TM_COMMAND_OUTPUT and tell
> TM how it prefers to be seen?
Unfortunately I do not think that I can read variables from the process
after having launched it.
> This might in general be the slickest way for commands to talk to TM,
> making special shell variables a two-way street.
I would like to introduce something that would allow the command to
select output, so far I've considered using escape codes similar to a
real terminal, so e.g. you'd do:
printf '\033[O:HTML]'
Or similar to set the output to HTML. Though it would require some
thought before I venture into this -- maybe this could also reduce the
current clutter I think exists in the “output” popup menu (i.e. too
many choices IMHO).
So there would be one new choice, namely “interpret stream” (in search
of a better name), and probably all the variants of insert/append
selection/document would be removed and would need to be done using
these escape codes instead (since all but replace document/selection
are probably rare output options -- and for compatibility I can just
insert the proper printf sequence when importing old commands that use
an exotic output form).
More information about the textmate-dev
mailing list