Revision: 54920
http://brlcad.svn.sourceforge.net/brlcad/?rev=54920&view=rev
Author: bob1961
Date: 2013-03-27 18:33:30 +0000 (Wed, 27 Mar 2013)
Log Message:
-----------
This fixes the Command::invoke method's mishandling of double quotes in nested
commands.
Modified Paths:
--------------
brlcad/trunk/src/tclscripts/lib/Command.tcl
Modified: brlcad/trunk/src/tclscripts/lib/Command.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/lib/Command.tcl 2013-03-27 18:23:52 UTC (rev
54919)
+++ brlcad/trunk/src/tclscripts/lib/Command.tcl 2013-03-27 18:33:30 UTC (rev
54920)
@@ -329,13 +329,19 @@
::itcl::body Command::invoke {} {
set w $itk_component(text)
- set cmd [$w get promptEnd insert]
+ set cmd [string trimleft [$w get promptEnd insert]]
set more_args_list {}
# remove any instances of prompt2 from the beginning of each secondary line
regsub -all "\n$itk_option(-prompt2)" $cmd "" cmd
- set cname [lindex $cmd 0]
+ set i [string first " " $cmd]
+ if {$i == -1} {
+ set cname $cmd
+ } else {
+ set cname [string range $cmd 0 $i-1]
+ }
+
if {$cname == "master"} {
invokeMaster $cmd
@@ -357,7 +363,6 @@
}
if {$do_history} {
- eval lappend cmd $more_args_list
$hist add $cmd
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits