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

Colorize other commands #66

Open
artemgurzhii opened this issue Feb 16, 2018 · 2 comments
Open

Colorize other commands #66

artemgurzhii opened this issue Feb 16, 2018 · 2 comments

Comments

@artemgurzhii
Copy link

Is there any chance of adding colorizing to the other commands, like tail/head/more/less, etc?

As an option, you can forward all arguments to the command(let's take tail as an example).

Assuming this command was passed to the console - ctail -20 ~/Folder1/folder2/.file
It can be transformed into something like tail -20 ~/Folder1/folder2/.file | ccat

As for now, we can manually add support for this. Just add

ctail() {
  tail "$@" | ccat
}

to your bash config file(and same for all other functions, if needed). But it would be great to have those functions as built-in, without the need of transforming your bash config file.

@binarykitchen
Copy link

nope @artemgurzhii this workaround doesn't work

ctail() {
  tail "$@" | ccat
}

when you use the tail -f option

@tmpm697
Copy link

tmpm697 commented Jan 10, 2020

You can overwrite builtin command, e.g:

function ls() {
    command ls "$@" | ccat
}

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

No branches or pull requests

3 participants