Filename "Portfile" is evil

Ryan Schmidt ryandesign at macports.org
Wed Aug 22 13:29:04 PDT 2007


Since we're already on the topic of changes to the dports dir (see  
"Categories are evil"), I'd like to propose that having 4000+ files  
named "Portfile" is evil, too.

In Mac OS X, I can associate files with applications based on the  
filename's extension. Filenames that have no extension cannot be  
associated with an application. Therefore, I can never double-click a  
Portfile and have it open into my preferred text editor; it always  
opens into the awful TextEdit. I want to be able to configure it to  
open in TextWrangler. Currently, I'm forced to either laboriously  
drag the Portfile to the TextWrangler icon, or type "port edit  
<portname>" in the Terminal, which is what I usually do. But being  
able to double-click in the Finder would be nice.

Also, editors like TextWrangler will do syntax highlighting of files,  
based on the filename extension. Since Portfiles have no extension,  
no syntax highlighting is provided.

Finally, it's also inconvenient that every Portfile's name is  
"Portfile". It makes them harder to distinguish them when several are  
open in the editor. Related: when I've downloaded a file  
"Portfile.diff" that someone has attached to a Trac ticket, and if  
I'm working with several tickets at once, I often forget which  
portfile the patch was meant for.

==> What if we used the name of the port, with an extension, like  
"apache2.macport"? I feel this would solve many problems at once.

(I was initially going to suggest the extension ".tcl" but the tcl  
syntax highlighting in TextWrangler is highlighting various words in  
port descriptions and such which we don't want, and which would  
probably get annoying.)





More information about the macports-dev mailing list