Understanding what I am calling the mess that is perl modules

Scott Haneda talklists at newgeo.com
Wed Jan 21 12:03:37 PST 2009


On Jan 21, 2009, at 4:46 AM, Ryan Schmidt wrote:

>> Also, is there any way for EDITOR to be dynamic, so that when I am  
>> on the actual machine I want to use mate as my editor, but if I am  
>> over ssh, I want to use a terminal based editor.  Is that just a  
>> matter of wrapping the default in a condition that checks where I  
>> am at?
>
> I would also be interested in knowing how to set that up. I've  
> wanted this many times but never really looked into what I would  
> need to do.


This seems to work for me:
if [[ -z $SSH_CLIENT ]]; then
         export EDITOR=/Users/me/bin/mate
else
         export EDITOR=/usr/bin/pico
fi;

--
Scott



More information about the macports-users mailing list