--- a/Filename.st Fri Jun 06 15:03:27 2014 +0200
+++ b/Filename.st Sat Jun 07 14:51:17 2014 +0200
@@ -4094,15 +4094,35 @@
!
openTerminal
- "open a terminal window on the directory represented by the receiver.
- On non-osx systems, an error is raised"
+ "open a terminal window on the directory represented by the receiver;
+ on osx, a terminal app is opened,
+ on windows a cmd.exe window,
+ on unix, an xterm is opened."
+
+ OperatingSystem isOSXlike ifTrue:[
+ "/ I dont know yet how to tell the terminal to
+ "/ go to a particular directory.
+ "/ therefore, use the built in terminal
+ VT100TerminalView openShellIn:self pathName.
+ ^ self.
+ ].
[
+ |cmd|
+
OperatingSystem isOSXlike ifTrue:[
- OperatingSystem executeCommand:'/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal ' inDirectory:self pathName.
+ cmd := '/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal '
] ifFalse:[
- OperatingSystem executeCommand:'xterm ' inDirectory:self pathName.
- ]
+ OperatingSystem isMSWINDOWSlike ifTrue:[
+ cmd := 'c:\windows\System32\cmd.exe'
+ ] ifFalse:[
+ "/ VT100TerminalView openShellIn:self pathName
+ cmd := 'xterm'
+ ]
+ ].
+ OperatingSystem
+ executeCommand:cmd
+ inDirectory:self pathName.
] fork
! !
@@ -6140,11 +6160,11 @@
!Filename class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.417 2014-05-26 18:32:32 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.418 2014-06-07 12:51:17 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.417 2014-05-26 18:32:32 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.418 2014-06-07 12:51:17 cg Exp $'
! !