Compare commits

...

8 Commits

@ -17,6 +17,15 @@ ccat is a file printing tool (like 'cat') which uses Regular Expressions to enab
--- ---
### Installing ### Installing
Download the appropriate zip-file from the 'Releases' section. Place the executable in your PATH.
NOTE: The releases are not available on the GitHub repo (which is a mirror of https://gitea.twomorecents.org/Rockingcool/ccat). Obtain the [releases](https://gitea.twomorecents.org/Rockingcool/ccat/releases) from there instead.
---
### Building from source
If you have the `go` command installed, run `make` after cloning the repository. If you have the `go` command installed, run `make` after cloning the repository.
--- ---
@ -27,7 +36,6 @@ The following languages have config files included by default:
- C - C
- Go - Go
-
--- ---
@ -63,4 +71,3 @@ Note that the color name must be capitalized (and shouldn't contain spaces). The
### TODO: ### TODO:
- Windows support. - Windows support.
- Allow users to provide a config file in the command-line, overriding the extension-based config file. - Allow users to provide a config file in the command-line, overriding the extension-based config file.
- Provide releases.

@ -1,9 +1,9 @@
package main package main
import ( import (
"ccat/stack"
"embed" "embed"
"errors" "errors"
"gitea.twomorecents.org/Rockingcool/ccat/stack"
"io/fs" "io/fs"
"os" "os"
"path/filepath" "path/filepath"

@ -10,11 +10,13 @@
# Strings in double quotes and single quotes # Strings in double quotes and single quotes
'"(.*?)"': BLUE '"(.*?)"': BLUE
"'(.)'": BLUE "'(.)'": BLUE
# Text inside angle-brackets (used in 'include' statements)
'\<(.*?)\>': BLUE
# Assignments and comparisons # Assignments and comparisons
# TODO: Add less than, greater than, not equal to, and struct pointer member access # TODO: Add less than, greater than, not equal to, and struct pointer member access
'(?:\s|\b)(=|==|!=|<=|>=|\->)(\s|\b)' : CYAN '(?:\s|\b)(=|==|!=|<=|>=|\->)(\s|\b)' : CYAN
# Keywords # Keywords
'\b(if|else|while|do|for|return)\b': CYAN '\b(if|else|while|do|for|return)\b': CYAN
'^(#ifdef|#ifndef|#define|#include)\b': CYAN '(\n|^)(#ifdef|#ifndef|#define|#include)\b': CYAN
# Data Types # Data Types
'\b(int|char|float|double|void|long|short|unsigned|signed|bool)\b': YELLOW '\b(int|char|float|double|void|long|short|unsigned|signed|bool)\b': YELLOW

@ -1,4 +1,4 @@
module ccat module gitea.twomorecents.org/Rockingcool/ccat
go 1.22.5 go 1.22.5

@ -1,5 +1,4 @@
1. Man page 1. Man page
2. README for GitHub Repo
2. Logging 2. Logging
3. Coloring functions 3. Coloring functions
4. Flag to list all available colors for your terminal - some terminals will only support the predefined colors. 4. Flag to list all available colors for your terminal - some terminals will only support the predefined colors.

Loading…
Cancel
Save