[TxMt] Re: Python/IPython support
Alex Ross
j at lasersox.net
Tue Oct 20 22:01:18 UTC 2009
On Oct 19, 2009, at 10:18 PM, unussum at gmail.com wrote:
> I made the mistake of setting an alias for bc, which I was not aware
> was the name of an existing unix tool (That's what I get for not
> capitalizing my personal aliases, I guess).
>
> # ~/.profile
> alias bc="echo ~/some/path"
> alias cdbc="cd $(bc)"
>
> Interestingly, if just an alias for bc is set, it still seems to work
> fine (is there some reason its use in TextMate would override the
> alias?). But as soon as $(bc) is utilized later in the file (in this
> case by my cdbc alias) various things become very weird under
> TextMate.
Well, if you are calling this “cdbc” alias in your .profile that
explains it. The python bundle expects to be in the same directory as
the script you are attempting to run. When you change dirs, you are
no longer in that directory and so you get undefined behavior. Still,
it doesn't seem like it should be nulling your file. The
save_current_document code reads STDIN (which TextMate is supposed to
have written the document contents on) and then just writes that to
TM_FILEPATH (the file you are currently editing). Is (was?)
your .profile reading stdin by any chance? That would explain why
save_current_document was erasing your file.
—Alex
More information about the textmate
mailing list