Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Pipes #1

Open
njwhite opened this issue Apr 15, 2014 · 2 comments
Open

Add Support for Pipes #1

njwhite opened this issue Apr 15, 2014 · 2 comments

Comments

@njwhite
Copy link

njwhite commented Apr 15, 2014

I'd ideally like the acoc to colour stdin if no command is given, e.g.:
$ ls -l | acoc
It'd be a bit more tricky to work out which set of rules to use (shells don't seem to tell a process in a pipe what the pid of the predecessor is, though this has some ideas). Maybe each process in the config could have regex that's used to determine if an arbitary output belongs to it?

@alexdantas
Copy link
Owner

Hey @njwhite, thanks for pointing that out!
It'd really be great feature to add.

Unfortunately I'm kinda busy these days - oh yeah, also sorry for taking so long to answer you.
I'll work on this asap, keeping you updated

@alexdantas
Copy link
Owner

This issue is being harder than I though.
I tried to tackle it in one go but it was to no avail.

So I'm reformatting ACOC's code to make it easier to maintain and add new features.
As I said before, the code's a mess and I still have to figure out a couple of things on the original author's mindset.

Just to keep track, @Stantheman gave me a great tip on Reddit: he made a perl script called fuse-colors.

On his words, it abuses a fuse filesystem and PATH to let you pre-mangle bash commands before being processed. Pipes and other normal shell characteristics aren't affected since it has access to everything before that processing takes place.

It's a nice place to start, along with your link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants