[TxMt] disable printing? (Doh.) other question
Allan Odgaard
allan at macromates.com
Tue Nov 2 18:21:55 UTC 2004
On 2. Nov 2004, at 18:59, M Spreij wrote:
> .bash_profile (or more precisely the first line is ". .bashrc" which
> seems to be some UNIX syntax I don't know about), as I want it to be
> used every time I open a terminal. The .bashrc file does sit in the
> same dir as .bash_profile: /Users/mspreij/.bashrc
Change it to:
. ~/.bashrc
Actually, it really should be:
[ -f ~/.bashrc ] && . ~/.bashrc
The “. <file>” means “read instructions from file”. The current
directory is not always your home directory when executing commands
from TextMate (I think I document this somewhere), so you should
provide a full path -- the “[ -f <file>]” means “true if file exists”
and && has the short-circuit behavior you probably know from some
programming language, i.e. if the first expression tests false (the
file doesn't exist), the right-hand side won't be executed.
So all in all it really mens:
if(exists("/Users/me/.bashrc"))
execute("/Users/me/.bashrc")
Kind regards Allan
More information about the textmate
mailing list