[37756] trunk/base/src/port/port.tcl
raimue at macports.org
raimue at macports.org
Sat Jun 21 18:25:49 PDT 2008
Revision: 37756
http://trac.macosforge.org/projects/macports/changeset/37756
Author: raimue at macports.org
Date: 2008-06-21 18:25:48 -0700 (Sat, 21 Jun 2008)
Log Message:
-----------
port/port.tcl:
Add new option --editor to port edit
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2008-06-21 23:11:33 UTC (rev 37755)
+++ trunk/base/src/port/port.tcl 2008-06-22 01:25:48 UTC (rev 37756)
@@ -2241,6 +2241,8 @@
# Operations on the port's directory and Portfile
global env boot_env
global current_portdir
+
+ array set local_options $opts
set status 0
if {[require_portlist portlist]} {
@@ -2292,10 +2294,16 @@
# Find an editor to edit the portfile
set editor ""
- foreach ed { VISUAL EDITOR } {
- if {[info exists env($ed)]} {
- set editor $env($ed)
- break
+ if {[info exists local_options(ports_edit_editor)]} {
+ set editor $local_options(ports_edit_editor)
+ } elseif {[info exists local_options(ports_ed_editor)]} {
+ set editor $local_options(ports_edit_editor)
+ } else {
+ foreach ed { VISUAL EDITOR } {
+ if {[info exists env($ed)]} {
+ set editor $env($ed)
+ break
+ }
}
}
@@ -2623,6 +2631,8 @@
# this argument takes
global cmd_args_array
array set cmd_args_array {
+ edit {{editor 1}}
+ ed {{editor 1}}
info {{category 0} {categories 0} {depends_build 0} {depends_lib 0}
{depends_run 0} {depends 0} {description 0} {epoch 0}
{homepage 0} {index 0} {line 0} {long_description 0}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080621/23fbe1e0/attachment.htm
More information about the macports-changes
mailing list