Giter Club home page Giter Club logo

ccat's Introduction

Metrics

ccat's People

Contributors

178inaba avatar ahmetb avatar chenglou avatar dmitshur avatar forivall avatar gilliek avatar haraldnordgren avatar iand avatar ladydascalie avatar mathhun avatar mattn avatar owenthereal avatar piamancini avatar vitorgalvao avatar yonatanahituv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccat's Issues

Proper [Python] syntax

Really like ccat so far. Enjoy the speed bump over pygmentize. However, I do want to point out that ccat's syntax recognition capabilities are sort of lacking. Is it possible to customize colors on a more granular semantic level, i.e. create different color flags for variables, functions? Most lines in a Python file fall under Plaintext. Whole comment lines ignore the Comment flag and output as if it were a normal line.

Deprecated call to sha1 methods

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/usr/local/Library/Taps/jingweno/homebrew-ccat/ccat.rb:6:in `<class:Ccat>'
Please report this to the jingweno/ccat tap!

Warning: Calling SoftwareSpec#sha1 is deprecated!
Use SoftwareSpec#sha256 instead.
/usr/local/Library/Taps/jingweno/homebrew-ccat/ccat.rb:6:in `<class:Ccat>'
Please report this to the jingweno/ccat tap!

Warning: Calling Resource#sha1 is deprecated!
Use Resource#sha256 instead.
/usr/local/Library/Taps/jingweno/homebrew-ccat/ccat.rb:6:in `<class:Ccat>'
Please report this to the jingweno/ccat tap!

What would happen if I aliased cat to ccat?

I love ccat, and I'm wondering what the consequences of setting an alias in my shell for cat -> ccat would be? Would the performance hit be significant? Might I run into encoding issues? Is this just a terrible idea?

Check this

alias ccat="pygmentize -O style=monokai -f console256 -g"

Feat req: pretty printing?

Could such a feature be considered for adding? Something like

ccat test.json --pretty

To make minified code more readable? Or is this out of scope for what you intend with ccat?

Feature Request: color output for `.patch` and/or `.diff` files

let's pretend the following file existed... it would be cool if ccat made minus (-) lines in red and plus (+) lines in green.

diff --git i/roles/splunk-shcluster/tasks/main.yml w/roles/splunk-shcluster/tasks/main.yml
index ecc8e75..494a30c 100644
--- i/roles/splunk-shcluster/tasks/main.yml
+++ w/roles/splunk-shcluster/tasks/main.yml
@@ -15,12 +15,8 @@
   assert: { that: "splunk_infra.splunk_master_uri is defined" }

 - name: get list of splunk sh cluster urls
-  set_fact: sh_cluster_member="https://{{ item }}:{{ splunk_mgmtHostPort }}"
+  set_fact: sh_cluster_servers_list="https://{{ item }}:{{ splunk_mgmtHostPort }},{{ sh_cluster_servers_list | default('') | regex_replace(',$', '') }}"
   with_items: "{{ play_hosts }}"
-  register: sh_cluster_members_result
-
-- name: turn sh_cluster_members values into new list
-  set_fact: sh_cluster_members_list="{{ sh_cluster_members_result.results | map(attribute='ansible_facts.sh_cluster_member') | list | join(",") }}"

 - splunk_facts:
   sudo: True

Pager

What is the recommended way to page through the output of ccat? ccat README.md | less -R for example does not work (no colors) even though it works for cat my.patch | colordiff | less -R.

Or would it make more sense to integrate pager into ccat (ccat -p README.md)?

Could it be used with git diff?

I ran that:

git config --global core.pager ccat

And I've got the highlight in diff, but with some weird symbols:

i

I guess it the git diff colors, since it looks nice if I turn it off:

i

I wonder could I combine gitdiff colors (basically, red/green for -/+ lines) and ccat ones?

Disable colouring while piping

I think its sort of standard to avoid colour while the output is passed to a pipe. It helps in further processing of the data. I understand it may be handy while piping to less or so. But most of the time, its better to be avoided.

Perhaps provide a flag and disable in by default.

apt-get

would be cool if we ubuntu users can apt-get install it too

unable to access ... : gnutls_handshake() failed: Public key signature verification has failed

Hi,
I want to install ccat on my new Debian Jessie 8.10 VM (using Vagrant), but there's an error :

$ go get -u github.com/jingweno/ccat
# cd .; git clone https://github.com/jingweno/ccat /home/vagrant/go/src/github.com/jingweno/ccat
Clonage dans '/home/vagrant/go/src/github.com/jingweno/ccat'...
fatal: unable to access 'https://github.com/jingweno/ccat/': gnutls_handshake() failed: Public key signature verification has failed.
package github.com/jingweno/ccat: exit status 128

Go version :

$ go version
go version go1.11.5 linux/amd64

So, have you an idea to help me please ? :)

F.

Add environment configuration option to set terminal background color

I use dark terminal. It is a pain to write every time --bg "dark".
It should be simple to read some environment variable (or any other type of global configuration file, e.g. ~/.ccat file) and define it globally. Then command line argument can just overwrite the global configuration, if present.

P.S. I want to add that light scheme looks ok on dark terminal, but i use dark terminal with transparency and only then it is unreadable. As it is unreadable for small portion of users, i do not think it is critical.

go panics on some files

Seems to happen the most on long "jsonl" files. That is a file with JSON that has a new JSON document on each line.

Here's an example stack trace:

fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x23bc300fde44 pc=0x27209]

runtime stack:
runtime.throw(0x21cd00, 0x2a)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/panic.go:527 +0x90
runtime.sigpanic()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.(*gcWork).put(0xc820022720, 0xc8204bc000)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mgcwork.go:87 +0x49
runtime.greyobject(0xc8204bc000, 0x0, 0x0, 0xc81ffda1ff, 0x0, 0x66fe40, 0xc820022720)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mgcmark.go:956 +0x2f1
runtime.shade(0xc8204bc024)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mgcmark.go:894 +0x9a
runtime.gcmarkwb_m(0xc8204bc000, 0xc8204bc024)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mbarrier.go:91 +0xc1
runtime.writebarrierptr_nostore1.func1()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mbarrier.go:117 +0x134
runtime.systemstack(0xc820021500)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:262 +0x79
runtime.mstart()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/proc1.go:674

goroutine 1 [running]:
runtime.systemstack_switch()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:216 fp=0xc820055288 sp=0xc820055280
runtime.writebarrierptr_nostore1(0xc8204bc000, 0xc8204bc024)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mbarrier.go:118 +0x71 fp=0xc8200552c0 sp=0xc820055288
runtime.writebarrierptr(0xc8204bc000, 0xc8204bc024)
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/mbarrier.go:137 +0x4b fp=0xc8200552f0 sp=0xc8200552c0
bytes.(*Buffer).grow(0xc8204bc000, 0x5, 0xe160ebb)
        /usr/local/Cellar/go/1.5.1/libexec/src/bytes/buffer.go:106 +0x151 fp=0xc820055398 sp=0xc8200552f0
bytes.(*Buffer).WriteString(0xc8204bc000, 0xc82006a710, 0x5, 0x5, 0x0, 0x0)
        /usr/local/Cellar/go/1.5.1/libexec/src/bytes/buffer.go:140 +0x4b fp=0xc820055400 sp=0xc820055398
main.Colorize(0x1ddb00, 0x5, 0xc8204ba000, 0xd, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/color.go:111 +0xcc6 fp=0xc820055728 sp=0xc820055400
main.Printer.Print(0xc82006c600, 0x6641c0, 0xc82008c008, 0x1, 0xc8204ba000, 0xd, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/printer.go:140 +0x7c fp=0xc820055778 sp=0xc820055728
github.com/jingweno/ccat/Godeps/_workspace/src/github.com/sourcegraph/syntaxhighlight.Print(0xc8200a8b00, 0x6641c0, 0xc82008c008, 0x664550, 0xc82006c600, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/.gopath/src/github.com/jingweno/ccat/Godeps/_workspace/src/github.com/sourcegraph/syntaxhighlight/highlight.go:162 +0xd1 fp=0xc8200557e8 sp=0xc820055778
main.CPrint(0x664528, 0xc82008c020, 0x6641c0, 0xc82008c008, 0xc82006c600, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/printer.go:130 +0xa3 fp=0xc820055848 sp=0xc8200557e8
main.ColorPrinter.Print(0xc82006c600, 0x664528, 0xc82008c020, 0x6641c0, 0xc82008c008, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/ccat.go:34 +0x55 fp=0xc820055888 sp=0xc820055848
main.AutoColorPrinter.Print(0xc82006c600, 0x664528, 0xc82008c020, 0x6641c0, 0xc82008c008, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/ccat.go:23 +0x7a fp=0xc8200558d0 sp=0xc820055888
main.CCat(0x7ffeefbff755, 0xa, 0x664500, 0xc82006c600, 0x6641c0, 0xc82008c008, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/ccat.go:75 +0x1fc fp=0xc8200559a8 sp=0xc8200558d0
main.(*ccatCmd).Run(0xc82006c6f0, 0xc820070b60, 0xc82006aac0, 0x1, 0x1)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/main.go:81 +0x7af fp=0xc820055c48 sp=0xc8200559a8
main.(*ccatCmd).Run-fm(0xc820070b60, 0xc82006aac0, 0x1, 0x1)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/main.go:102 +0x48 fp=0xc820055c78 sp=0xc820055c48
github.com/jingweno/ccat/Godeps/_workspace/src/github.com/spf13/cobra.(*Command).execute(0xc820070b60, 0xc820090010, 0x1, 0x1, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/.gopath/src/github.com/jingweno/ccat/Godeps/_workspace/src/github.com/spf13/cobra/command.go:495 +0x6e3 fp=0xc820055d88 sp=0xc820055c78
github.com/jingweno/ccat/Godeps/_workspace/src/github.com/spf13/cobra.(*Command).Execute(0xc820070b60, 0x0, 0x0)
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/.gopath/src/github.com/jingweno/ccat/Godeps/_workspace/src/github.com/spf13/cobra/command.go:560 +0x180 fp=0xc820055e88 sp=0xc820055d88
main.main()
        /private/tmp/ccat20151130-62599-1v7ai72/ccat-1.1.0/main.go:127 +0x4f4 fp=0xc820055f50 sp=0xc820055e88
runtime.main()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/proc.go:111 +0x2b0 fp=0xc820055fa0 sp=0xc820055f50
runtime.goexit()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc820055fa8 sp=0xc820055fa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/local/Cellar/go/1.5.1/libexec/src/runtime/asm_amd64.s:1696 +0x1

Colorize other commands

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.

Allow -t switch

Hi,

I recently got the following error from a script that I run regularly

Error: unknown shorthand flag: 't' in -t
Run 'ccat help' for usage.

From man cat

-t      Display non-printing characters (see the -v option), and display tab characters as `^I'.

Could ccat at least ignore that switch to be compatible with the cat command on macOS?

Kind regards,
David

export default theme to use with vim

I find default theme of ccat is pretty nice when display color of .go files.

Is there a way to import it to use as a colorscheme for golang in vim? maybe a go.vim?

Rainbow Colors

Rainbow colors are nice to have like: lolcat

Lolcat's deficit is handling utf8, which Golang handles gracefully. This would be great to have in ccat so I can move all my monitoring/uptime scripts from lolcat to ccat.

restrict to specific extensions?

would it be possible to restrict ccat to a particular set of extensions (ie .js, .json, etc), otherwise defaulting to regular cat?

Fail to install on OSX (homebrew)

> brew tap jingweno/ccat
==> Tapping jingweno/ccat
Cloning into '/usr/local/Library/Taps/jingweno/homebrew-ccat'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
Checking connectivity... done.
Tapped 1 formula (26 files, 108K)

> brew install ccat
==> Installing ccat from jingweno/homebrew-ccat
==> Downloading https://github.com/jingweno/ccat/archive/v0.0.1.tar.gz
######################################################################## 100.0%
==> go build -o ccat
    /usr/local/Cellar/go/1.4.2/libexec/src/github.com/codegangsta/cli (from $GOROOT)
    /Users/m/dev/goPlay/src/github.com/codegangsta/cli (from $GOPATH)
printer.go:7:2: cannot find package "github.com/sourcegraph/syntaxhighlight" in any of:
    /usr/local/Cellar/go/1.4.2/libexec/src/github.com/sourcegraph/syntaxhighlight (from $GOROOT)
    /Users/m/dev/goPlay/src/github.com/sourcegraph/syntaxhighlight (from $GOPATH)

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/jingweno/homebrew-ccat/issues

Pipe output to some other command(s) before colorizing

Is it possible to pipe the file output's to some other command before colorizing?

E.g. ccat file --pipe-to="grep 'pattern'"

EDIT: I found out know it's possible to do it like this:

cmd file | [commands] | ccat

Reading from stdin instead, so I guess it solves it for me.

suport php future?

i am a phper ,this tool is such cool,but i found that it does not support php,so sad :(

Dockerfile highlighting breaks on wildcards

FROM base:1.0.0

RUN rm -rf /path/to/wildcard/*

RUN stuff && things
FROM base:1.0.0

RUN rm -rf /path/to/something

RUN stuff && things

In the first case everything from /* onwards is not highlighted.

Error: Calling Formula.sha1 is disabled!

I started getting this error today. I think you need to release a new version.

Use Formula.sha256 instead.
/usr/local/Homebrew/Library/Taps/jingweno/homebrew-ccat/ccat.rb:6:in `<class:Ccat>'
Please report this to the jingweno/ccat tap!

Line number support ?

I saw the original cat has the switch -n that would prefix line numbers , might be useful ?

Infinite stream

Is it possible to use ccat to colorize infinite stream?

My use case is to use it with tail -f like this:

tail -f /some/log/file.log | ccat

Currently it is not displaying anything.

Mismatched SHA

I was going through the installation instructions with brew but get a mismatch SHA error on install:

screen shot 2015-05-08 at 9 33 56 am

I removed the tar file as it suggests but no dice. Any ideas on what might be happening?

Thanks!

cless?

cat -> ccat
less -> cless ?
it would be really nice.

Fail to install on Ubuntu 14.04

$ env | grep GO
GOROOT=/usr/local/go
GOPATH=/home/rpinson/go
$ go install github.com/jingweno/ccat
../go/src/github.com/gogo/protobuf/proto/text.go:44:2: cannot find package "encoding" in any of:
    /usr/local/go/src/pkg/encoding (from $GOROOT)
    /home/rpinson/go/src/encoding (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/defs.go:10:2: cannot find package "sourcegraph.com/sourcegraph/go-nnz/nnz" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/go-nnz/nnz (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/go-nnz/nnz (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/repositories.go:9:2: cannot find package "sourcegraph.com/sourcegraph/go-vcs/vcs" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/go-vcs/vcs (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/go-vcs/vcs (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/build_data.go:8:2: cannot find package "sourcegraph.com/sourcegraph/rwvfs" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/rwvfs (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/rwvfs (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/defs.go:13:2: cannot find package "sourcegraph.com/sourcegraph/srclib/graph" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/srclib/graph (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/srclib/graph (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/defs.go:14:2: cannot find package "sourcegraph.com/sourcegraph/srclib/store" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/srclib/store (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/srclib/store (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/defs.go:15:2: cannot find package "sourcegraph.com/sourcegraph/srclib/unit" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/srclib/unit (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/srclib/unit (from $GOPATH)
../go/src/sourcegraph.com/sourcegraph/go-sourcegraph/sourcegraph/query_tokens.go:11:2: cannot find package "sourcegraph.com/sourcegraph/vcsstore/vcsclient" in any of:
    /usr/local/go/src/pkg/sourcegraph.com/sourcegraph/vcsstore/vcsclient (from $GOROOT)
    /home/rpinson/go/src/sourcegraph.com/sourcegraph/vcsstore/vcsclient (from $GOPATH)
$ go get github.com/jingweno/ccat
package encoding: unrecognized import path "encoding"
munmap of stack space failed: errno 22
Aborted


goroutine 1 [select]:
main.$nested27
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/http.go:57
main.httpsOrHTTP
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/http.go:65
main.repoRootForImportDynamic
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/vcs.go:468
main.repoRootForImportPath
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/vcs.go:362
main.downloadPackage
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/get.go:269
main.download
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/get.go:166
main.download
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/get.go:232
main.download
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/get.go:232
main.runGet
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/get.go:72
main.main
    /build/buildd/gccgo-go-1.2.1/src/cmd/go/main.go:161

goroutine 3 [syscall]:
    goroutine in C code; stack unavailable

Am I doing something wrong here?

Log line includes timestamp

$ ccat foo
2017/05/12 09:51:26 open foo: no such file or directory

I think it's go's default log package causing this. The timestamp here doesn't make much sense.

conflicting formulas

seems formula have been added upstream: Homebrew/legacy-homebrew@f8e10bb

> brew update; brew upgrade
Warning: Could not create link for jingweno/ccat/ccat, as it
conflicts with Homebrew/homebrew/ccat. You will need to use the
fully-qualified name when referring this formula, e.g.
  brew install jingweno/ccat/ccat
Updated Homebrew from 84dd2e2f to d956958c.
==> New Formulae
ccat
...

one solution is to remove this tap:

brew untap jingweno/ccat

ccat /directory/name doesn't warn that target is a directory

ccat /directory/name does not warn that the target is a directory – it simply returns with exit code 0 and nothing printed to screen. While not a serious issue, considering the user will likely discover their error, it does have potential to cause unnecessary confusion.

cat returns the following: cat: /directory/name: Is a directory with exit code 1

OS X 10.11.5 / ccat v1.1.0

ccat pipe into less not coloring syntax

Title is pretty self explanatory but if you ccat file.go | less the scrollable text is not colored. Not entirely sure if you can color something and then pipe it but if you can it would be a nice feature to run through long files using less to scroll

Stops colorizing at /* (slash asterisk)

Describe the bug
Stops colorizing at asterisk symbol *

To Reproduce
Steps to reproduce the behavior, for example:

  1. ccat ~/.zshrc
  2. Color stops after line # Standard plugins can be found in ~/.oh-my-zsh/plugins/*

Expected behavior
Colorize whole file

Screenshots and/or Recordings
image

Defining the comments on the command line (or automatically).

Hi,

If I just :
#ccat ~/.tcshrc
I can see that the comments are not displayed in lightgrey.
It could be useful to be able to define what a comment is and to automatically set it depending on the kind of file.
shell script, .bashrc, .tcshrc, ... => #
text file => none or user-defined
verilog => //
...

Either ccat could recognize the file type or the user could define the comment with a -comment = ... argument.
multi-line arguments will be more tricky but lets start with a simple stuff.

Regards.

Xuo.

CSV support

Would be nice to provide a way to colorise output of CSV files like the raindow csv IDE plugins.

No autocompletion when using zprezto

When I type like ccat pack' and hit [TAB] in the hope to have it autocomplete to ccat package.json`, nothing happens.

Guess it does not get on well with my current zprezto config. Or am I missing something?

Linebreak at end of file?

Will it be easy to implement such an option?
When ccat is called with this option, it will add a linebreak at end of file, if the file itself does not end with a linebreak. (This is not an option from the original cat)

Example:

user@host~$ ccat my_number.txt
13189057482user@host~$ 

vs

user@host~$ ccat -l my_number.txt
13189057482
user@host~$ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.