From: <jfa...@us...> - 2010-03-13 20:43:54
|
Revision: 5697 http://oorexx.svn.sourceforge.net/oorexx/?rev=5697&view=rev Author: jfaucher Date: 2010-03-13 20:43:47 +0000 (Sat, 13 Mar 2010) Log Message: ----------- tuning Modified Paths: -------------- incubator/ooRexxShell/oorexxshell.rex Modified: incubator/ooRexxShell/oorexxshell.rex =================================================================== --- incubator/ooRexxShell/oorexxshell.rex 2010-03-13 20:42:21 UTC (rev 5696) +++ incubator/ooRexxShell/oorexxshell.rex 2010-03-13 20:43:47 UTC (rev 5697) @@ -74,7 +74,7 @@ shell = .context~package~findRoutine("SHELL") shell~setSecurityManager(.ooRexxShell~securityManager) --- Bypass defect 2933583 (fixed in next release after 4.0) : +-- Bypass defect 2933583 (fixed in release 4.0.1) : -- Must pass the current address (default) because will be reset to system address when entering in SHELL routine shell~call(arg(1), address()) @@ -86,8 +86,6 @@ ::routine SHELL use strict arg .ooRexxShell~initialArgument, .ooRexxShell~initialAddress -call on halt name haltHandler - .ooRexxShell~readline = .true -- assign .false if you want only the basic "parse pull" functionality .ooRexxShell~defaultColor = "white" @@ -136,6 +134,7 @@ main: procedure REPL: + call on halt name haltHandler .ooRexxShell~prompt = "" if .ooRexxShell~isInteractive then .ooRexxShell~prompt = prompt(address()) .ooRexxShell~inputrx = readline(.ooRexxShell~prompt)~strip @@ -191,14 +190,14 @@ ------------------------------------------------------------------------------- prompt: procedure - use strict arg systemAddress + use strict arg currentAddress .color~select(.ooRexxShell~promptColor) say say directory() .color~select(.ooRexxShell~defaultColor) -- No longer display the prompt, return it and let readline display it prompt = .ooRexxShell~interpreter - if .ooRexxShell~interpreter~caselessEquals("ooRexx") then prompt ||= "["systemAddress"]" + if .ooRexxShell~interpreter~caselessEquals("ooRexx") then prompt ||= "["currentAddress"]" prompt ||= "> " return prompt @@ -410,6 +409,7 @@ call loadPackage("socket.cls") call loadPackage("bsf.cls") call loadPackage("uno.cls") + call loadPackage("rgf_util2.rex") -- http://wi.wu.ac.at/rgf/rexx/orx20/rgf_util2.rex return @@ -527,7 +527,7 @@ -- But I don't want it for the commands directly managed by the systemCommandHandler. if command~caselessPos("set ") == 1 then return command -- variable assignment if command~caselessPos("cd ") == 1 then return command -- change directory - if .RegularExpression~new("[:ALPHA:]:")~~match(command)~position == 2 then return command -- change drive + if .RegularExpression~new("[:ALPHA:]:")~~match(command)~position == 2 & command~length == 2 then return command -- change drive args = .platform~string2args(command) if args[1]~caselessEquals("cmd") then return command -- already prefixed by "cmd ..." if args[1]~caselessEquals("start") then return command -- already prefixed by "start ..." @@ -691,6 +691,11 @@ end +::method init + forward class (super) continue + self~class~current = self -- normally you never call directly a method of .WindowsPlatform, but just in case... + + ::method which -- The order of precedence in locating executable files is given by the PATHEXT environment variable. use strict arg filespec @@ -718,7 +723,7 @@ return "" -::method string2args public +::method string2args -- Converts a string to an array of arguments. -- Arguments are separated by whitespaces (anything < 32) and can be quoted. use strict arg string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |