features of a new SHELL

Hello,
My team and I planing to create a new shell. We are including features like handing the "command not found" exception, etc....

1)Can you please give some suggestions on what do do while writing a new shell.....

2)can you please give me your problems with the existing shells..My platform is RED HAT 9 and FEDORA 8.

please list them out in points so that we can understand better......:smiley:

First, a good shell should be cross-platform, so making this a Linux-specific question is a bad idea. Would you like me to move the post to another forum?

Second, it should be backwards-compatible with classic sh. It should also be POSIX compatible, but have extensions that remove POSIX stupidities.

Third, it should be better about quoting and handling spaces. Maybe it could be more perl- or php-like in this regard. Syntax for handling regexps would also be nice. A shell that can also be used as an ad-hoc web form language would be nice. (It doesn't need to replace PHP, only borrow basic ideas from it).

Third, what do you mean "handling" the "command not found" exception? Do you want to simply remove the PATH limitation so that if a program isn't in your PATH, the shell will find it anyway? Might be a good way to sneak in trojans! Maybe the shell could suggest alternative programs from a list of paths in the update/location database? Or it could use mod apache's speling.o module to find command-line typos?

Finally, have you looked into creating a zsh module? It already does many of these. I've read that zsh is remarkably modular and can be used to extend new features. I don't use it simply because I know bash pretty well and don't see a reason to change. If I were to start anew, I'd use zsh.

hello,
thanks a lot for your reply.It was very informative.I shall surely take your words and do the best that I can.
Can you please forward this post in other forums.You said you will do it.Can you send me the link.I shall go and keep seeing there.

I wanted to know the POSIX stupidities that you were saying.What are the problems we generally face with "POSIX" :confused:

Note -- I'm sticking this thread for a month to let people comment. If other board moderators/admins override, that's fine. I think it's useful to as many people in the community to let people comment on this one.

I don't think that another shell is a good idea. I believe that the strength of the UNIX os is among other things its simplicity. After almost 30 years there is a dozen of shells and this is no good for anybody. Of course some new shells, e.g. bash are better than the older ones but you must have something very important to offer with another new shell. Thanks for hearing my opinion.

Dozens of shells have come and gone on UNIX and GNU/Linux over the years. Nothing wrong with producing a new shell. If it is exceptional, users will flock to it. If it is mundane, users will ignore it.

Some ideas. Make it object orientated. Look at what Dave Korn is doing with ksh93 and compound variables and types. Not quite there yet but heading in the right direction. Add methods to variables similar to what is called discipline functions in ksh93 but cleanly implemented. Look at Ruby for ideas in this area. Make it modular ALA zsh. Include auditing. Maybe profiling like on Solaris. Include native threads for job control and concurrency. Include extended regular expressions. Include date and time manipulation ALA ksh93 printf %T but using a different syntax.

Hello sir,
I am very happy to see the optimistic note of the posts above.I have finished handling the "command not found" exception. I am currently working on "help me linux".
Here my target is the linux newbie who know nothing abt commands.He can enter his doubts like = "how to list a file?" And my perl code will tell him about "ls". I also want to handle queries like "how to lst a file?".Here the spelling is wrong, even then I am working with commands like aspell,hunspell to do the job for me.

           I also have ideas like encrypting files,derectories with gpg so that even if one could get root password, he cannot open it, searching in LAN using openSSH. Can you please tell me where I stand now.I dont know whether I am going in the right direction or not !!!

I like fpmurphy's ideas. It sounds like you're trying to create a "shell for unix dummies", which is also a good idea, but completely different than what fpmurphy is talking about. Also, your idea can be handled very simply as extensions to zsh. What else did you have in mind besides "command not found" and of prompting users with helps and tips?

Speaking of providing user tips, is there a database of command-line tips, formatted for use by "fortune" ?

I think that anyone engaging in such a task should themselves have a vision for it.

What is your vision, nsharath?

Hello sir,
I have included some other features like :-

  • Script application
    In my college my prof gave me this requirement. He said during a LAB EXAM. I wanna catch the cheating students.So need to :-
    a)catch the login IDs of students who mailed the code to whom

b)what is the login and logout times.To know how long each worked on the given exam question(using last command)

c)verify the output of every student by viewing their typescripts.

*reminder application
this should simulate the mobile phones reminder application.The shell should pop us about the meetings,etc that each user has when a note is saved to remind him.

*chatting
chatting GUI like the yahoo messenger.

*session invoker
this makes use of the screen command which has a wide range advantages as we can invoke the session in which we were working previously.

  • man page generator
    today we write various scripts which can be used as commands when executable permissions are given to it. Now this module will create a man page for your command once you enter the description in a text file and give it.

Well till now I have worked on the above.Can you please give me some more ideas so that I and my team would like to work on it and expand the utilities of this shell.

awaiting your reply sir!!!

Uhm, all except "Reminder application" can be done with existing shells and scripts. I think a Reminder Application could be done with a cron job, but having it in the shell might be a bit cleaner. Having it tied into "screen" would be best.

A reminder option script can easily be built for ksh93 using the alarm discipline function. It is undocumented but type "alarm --man" to view the man page. For zsh, it is only a matter of writing a suitable module.

Other shells could be easily modified support such an option by modifying the main loop. Look at how MAILCHECK is implemented in csh/tcsh.

oh thanks for ur views sir.
Can you advice me on what topics I should work on....so that I can contribute to this shell........

I think the consensus is: DONT reinvent the shell. Just extend zsh to fulfill your criteria.

Hello,
can you please telll me the features in zsh that impressed you the most.
I am conducting a survey.
So please do give me a complete answer.

Start a new thread and post a Poll with it. Of course, before you can post a poll, you have to have an idea of some of the responses. But wait !! There's a similar thread/poll -- "What shell do you use the most" or something. Go check that out and see what the responses are.