You mean like this? http://wiki.squeak.org/squeak/1914 http://www.squeaksource.com/CommandShell/
Load OSProcess, then load CommandShell, then load CommandShellPharo. World menu -> open... -> Command shell On Tue, Dec 07, 2010 at 10:30:30AM -0800, Dale Henrichs wrote: > I was thinking about a number of things in the shower this morning and > then it occurred to me that it would be interesting to create a shell > environment INSIDE a Smalltalk vm. > > It wouldn't be a complete environment, but it would include a small set > of standard unix utilities: > > - awk > - sed > - grep There are a few "commands" such as help, edit, fc, and inspect that are implemented in Smalltalk. The general approach is to first try evaluating an expression as a doIt, then check if it's a "command" written in Smalltalk, else assume it's an external command, so expand the path do globbing, and run the resulting command and arguments under OSProcess. The doIt's, Smalltalk commands, and external programs can all be pipelined as with a unix shell, so you can for example run "ls | edit" to pipe the output of /bin/ls into the Smalltalk "edit" command in the image. > > the "directory structure" would be the package structure in the image > (or maybe multiple views on the image contents) with the basic idea that > you 'cd' into a class where there is a 'file' that contains the class > attributes. you then 'cd instance/all' and you are in a "directory" of > methods where you can 'vi at:put:' and have a vi-like editor come up on > the source of the at:put: method of course awk, grep, and sed work on > all of these 'source files'... there would be 'executable files' that > are simply workspaces ... > > I know that folks have externalized files, but I don't know if anyone > has internalized the shell environment ... > > The reason for internalizing the shell is that it becomes easy to > transition to the debugger and other traditional browsers/windows. > > The big reason for internalizing the shell is to provide a unix-like > interface for Smalltalk that might make transition to the Smalltalk > tools easier for folks new to Smalltalk. > > The secondary reason (and probably just as important) for internalizing > the shell, is that the hard-core Smalltalk developers might actually > find some utility in using the "smalltalk shell" in the normal course of > development and if hard-core developers use it, it will be maintained > and might lead to other interesting things... > > The idea is that the entire "smalltalk shell" would be implemented in > Smalltalk so you could bring up browsers with a command ... Yes, that's how it works. > > I've been thinking wistfully back to the days when I lived inside of > Emacs in the days before every terminal had a mouse ... back then I put > my hands on the keyboard at the start of the day and they stayed there > the entire day all window navigation was done via the keyboard ... I > lost all of that once I started doing development in Smalltalk... > > Anyway that about covers todays "ideas from the shower"... > > Dale I'm pretty sure that's how I came up with the idea too ;-) Dave
