View Single Post
  #6   (View Single Post)  
Old 17th March 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Ironically Carpetsmoker, the first thing I see in that Google is a page with one of my commit logs on it :-P, BSDfan however gets the prize -> on a typical QWERTY keyboard, the 'P' is on the opposite side of the main cluster from the 'C', in fact up 2 rows, starboard ~7 keys; so I would have to be cock-eyed drunk to make that typo (even for me, lol).

Because I hate things like cygwin or SFU[!], bringing unix shells along with me to Win32 is to much damn trouble, and on a bsd/linux platform there is no reason to install a non standard shell. Cmd.exe is ok for batch scripting but sucks monkey balls for interactive use (even ash is better). Alternating between flavours of Almquist, Korn, Bourne Again, Z, and cmd.exe is not fun, because I like programs I use *a lot* to always behave the same where ever they are. Around February I decided to experiment further and put boredom to good use.


The "mysterious" solution: write a portable shell tailored to my tastes.


tsh is probably taken on unix whether or not it'll ever reach $PATH, and I'll never know if some stupid program in my %PATH% takes over "shell", so I inserted another letter from my initials (T.M.P.), creating tpsh; which as far as I know is a free enough name for my needs.


tpsh stands for Terry's Portable SHell.


Compact shell written in perl, to behave more or less as a 'sh' would when it doesn't deviate from what I desire; but not strictly compatible with any existing shell either. Also as opposed to being _yet_ another perl powered shell configured / extended in Perl code or a shell bloated into a 20 ton monster, tpsh is instead meant to grow a fairly sh-compatible scripting interface along with the extras I desire without being huge :-) or in short, tpsh will be exactly what I desire from a sh but installing it becomes more like installing a sane Term::ReadLine back end on a platform with decent Perl support, then like shoe horning a "popular" unix shell into FoobarOS without a full environment.



I currently have a small shell with very basic support for named macros, environment variables, filename globing, I/O redirection, pipes (unix only atm), and quoting; which is evolving into more completeness over time. Filename and command completion also works, and soon the completion and globing behavior will become user configurable. The big features mile stone will probably be when tpsh can survive parsing my current Bourne-family shell profile without barfing.




Did I *really* have to start writing my own shell? No but chewing on it sure passes the time pretty well. Some people train cock roaches to kill time, I write things instead :-P.


Does that long post cure your curiosity? lol
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote