
Hi. Who wants to try devloping a new shell with me? The main goals: try adding some haskell scriting instead of bash/zsh, history dependend on a) executing program b) current dir c) last commands d) workspaces which should mean that the shell should save at least the last 10 commands of a,b,c,d. So you can do emerge (lookup parameters in history) even if you haven't used emerge for ages.. :) Nice, isn't it? d) Workspaces should mean: You can define some kind of workspace like workspace=haskellproject, wash, apache to add these tags together with the commands to the history.. So when working only in the "wash" workspace you can easily find those commands.. Perhpas it's even useful to attach commands or even scripts to those workspaces? eg the startApache script may be attached to admin, apache, ..., the cd /etc/init.d command only to admin.. I also would like to have some advanced kind of directory matching, defining aliases for directories. eg just type cd /usl to get a list of diretories looking like this: /UserShupportLocales /usr/src/linux /usl ? Using tab and bash is nice but it might be done better? Any suggestions? One would have to think about how to run processes in background and so on ... adding files as parameters the way it's possible in mc ( select them and add them to the command line ) perhaps even implement cp/mv/ ... for virtual file systems like zip files/ ftp/ ... ? and last but not least: on windows add all Programs beeing found in Start-> Programs to the path list... I wish I could just do word/ Enterprise Manager at a shell and not searching for the menu entries over and over again.. ;) I know I can add them the to the path.. but that would be some work, too.. and not desirable in any case. I could imagine adding a small prefix to each cmd eg. eb (execute bash cmd) ez (execute zsh cmd) r (remove file list) efs (execute from windows start menu) bg <cmd> run in background like bashs & feature. Perhaps even introduce some new syntax ? or use ghci or hugs with a preprocessor to translate these commands to haskell commands? What do you think? Marc Weber

Did you see [http://nellardo.com/lang/haskell/hash/] ? Google also finds some links to code. #g -- Marc Weber wrote:
Hi.
Who wants to try devloping a new shell with me?
The main goals: try adding some haskell scriting instead of bash/zsh,
history dependend on a) executing program b) current dir c) last commands d) workspaces which should mean that the shell should save at least the last 10 commands of a,b,c,d.
So you can do emerge (lookup parameters in history) even if you haven't used emerge for ages.. :) Nice, isn't it?
d) Workspaces should mean: You can define some kind of workspace like workspace=haskellproject, wash, apache to add these tags together with the commands to the history.. So when working only in the "wash" workspace you can easily find those commands.. Perhpas it's even useful to attach commands or even scripts to those workspaces?
eg the startApache script may be attached to admin, apache, ..., the cd /etc/init.d command only to admin..
I also would like to have some advanced kind of directory matching, defining aliases for directories.
eg just type cd /usl to get a list of diretories looking like this: /UserShupportLocales /usr/src/linux /usl ?
Using tab and bash is nice but it might be done better?
Any suggestions?
One would have to think about how to run processes in background and so on ...
adding files as parameters the way it's possible in mc ( select them and add them to the command line )
perhaps even implement cp/mv/ ... for virtual file systems like zip files/ ftp/ ... ?
and last but not least: on windows add all Programs beeing found in Start-> Programs to the path list... I wish I could just do word/ Enterprise Manager at a shell and not searching for the menu entries over and over again.. ;) I know I can add them the to the path.. but that would be some work, too.. and not desirable in any case.
I could imagine adding a small prefix to each cmd eg.
eb (execute bash cmd) ez (execute zsh cmd) r (remove file list) efs (execute from windows start menu) bg <cmd> run in background like bashs & feature.
Perhaps even introduce some new syntax ? or use ghci or hugs with a preprocessor to translate these commands to haskell commands?
What do you think?
Marc Weber _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Graham Klyne For email: http://www.ninebynine.org/#Contact

Wow.. quite many responses.. I'll have to rearead them thoroughly.. ;) I think GHCI would be great (expect it's start up time compared to bash ;) I wouldn't use hs-plugins because it needs quite a lot of time to compile pieces of code.. I got the idea to use something like Don Libes expect/pexpect (python) as layer between user/ghci ? So you can use short characters beeing expanded? Problem: How to get to know when ghci has finished executing a command? I don't like the approach to putting every command in a function by default. But I want to do so for some commands. Eg sox/ aplay, For most small problems you can't get a shorter command than using bash.. So why not be able to switch. Meta-b -> bash Meta-h -> haskell Meta-9 -> plan9 And after executing a command with bash take over the environment variables? One thing I'd really like to improve is history/ completion. So it would be cool to extend ghci to be able to use something like class Completion Completable where getCompletions :: Completable -> firstChars -> [String] or doCompletion :: Completable -> firstChars -> IO Completion or something more general perhaps even providing some list to select individual filenames... I'd also like to do somehthing like prog1 | prog2 | prog3| xargs mplayer .. Then prog1-3 and mplayer may be running at the same time. I still want to be able to send keys to prog1,2,3 and mplayer.. (eg to mute mplayer or to speed the music up, goto the next file, ....) That would be reallly cool and interactive ;) Marc

We haven't talked about bash features like !:1 !:$ yet !:1 means first argument of last commands, !:$ means last argument of last command Some kind of completion could also be achieved by using this completion:: IO (a) -- a in this case Filename liftM cat completion where is a function (or another program) with it's own interface... beeing executated after pressing enter.. A haskell shell would be nice because you could also do something like this (in the manner of formIntegral) : dvd <- (fromVideo viedo.mov))::MyDVD butn dvd >> mkiso dvd ;) Wow!!! You would be able to assemble common task in a new, type-safe fashion. fromVideo of cause would itself call something like mplayer or transcode. Marc Weber
participants (2)
-
Graham Klyne
-
Marc Weber