Hacker News new | past | comments | ask | show | jobs | submit login

Hey,

This is very cool. It does remind me of powershell in it's aims & inspiration. But agree with nailer that using json (or javascript data structures) would hopefully end up with a better, more cohesive shell in awkward. I no longer use Powershell (I got sick of the microsoft ecosystem)

I'm not sure what format Powershell uses to pipe structured data around, but it seemed to be some kind of ad-hoc 'whatever-they-came-up-with-at-the-time' mish mash, instead of using say, JSON, and leveraging the power of arrays, dictionaries et al. In fairness json was just starting when I was using Powershell, so it wouldnt have been on their radar.

One question, How are you turning output from ls into arrays? Or is ls just a javascript function that behaves like ls?

Oh, also, what strategies do you envision for wrapping arbitrary commands, or creating an ecosystem of wrappers? Perhaps some kind of plugin system?

I am currently also getting excited by hyperterm, and wonder if there is some kind of fusion there with your project (that is getting _alot_ of traction).

Cheers for the cool software!




So Ive actually been looking through the source for awkward, and it led me down the rabbit hole to shelljs, and cash.

shelljs actually reimpliments alot of shell commands in javascript, eventually mutating the output of the functions into flat strings here: https://github.com/shelljs/shelljs/blob/master/src/common.js...

The point being that the outputs of each of these functions is available (technically, it may require refactoring to get at the output pre-stringified) without having to parse formatted text.

Alot of work has been done here.


Thank you!

Regarding how I structure the command output, this is the module which does the job https://github.com/iostreamer-X/Awkward/blob/master/terminal...

It splits on basis of '\n' and removes empty chars, then finally pushes the cleaned output in an array.

Regarding, the plugin system. Well, honestly I haven't thought about it but I do like the sound of it. Thanks for sharing the idea.

I am yet to try hyperterm but from what I have seen, it looks sooo awesome, and I think things could get 'awkward' there :p




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: