Cleaned up some other stuff Sane Defaults aswell |
||
|---|---|---|
| .vscode | ||
| bin | ||
| build | ||
| docs | ||
| include | ||
| make | ||
| src | ||
| testing | ||
| tests | ||
| .gitignore | ||
| Makefile | ||
| README.md | ||
README.md
colorterm
Project description
Requirements
Requirements
RHEL-like:
sudo dnf install readline-devel
Debian[12]:
sudo apt update; sudo apt install build-essential libreadline-dev make
Building from source
One-liner to shell for Debain-based distros:
sudo apt update; sudo apt install build-essential libreadline-dev make git && git clone https://git.stephenltoth.com/icaema/colorwrap.git && cd colorwrap && make && make run;
Run:
bin/cterm /bin/sh
# or
make run
# they do the same thing
Usage
make run
# or (for strace)
make trace
As of right now there are only 7 hardcoded replacements (for color) in the src/main.c file. These are actually regex patterns.
// OUT OF DATE. IM LAZY AND DIDNT UPDATE THEM YET
"^d" //-> Magenta
"r--" //-> Green
"rw-" //-> Red
" .$" //-> Blue
" ..$" //-> Blue
"alpine" //-> Magenta
"z9Da0Da1" //-> Red
In the testing directory, there are some test files for doing ls -al and a long file for being long (with some keywords being sprinkled in).
Considerations and Caveats
Since this program buffers input by line, It will not handle TUI-based commands Examples include less and vim
If you need to use these kinds of applications, do not use this program to wrap your shell.
"Installation"
Normal build: make
Debug build: make debug
Run unit tests: make test
Example
Documentation
Location of Documentation
Directory structure
|-- Makefile <- Project makefile
|-- README <- Project README
|-- bin <- Compiled binaries
| |-- cterm <- Project main executable
| `-- testsuite <- Unit testing executable
|-- build <- Static objects and intermediate files
|-- docs <- Documentation
|-- include <- Header files
|-- lib <- Dynamic objects
|-- src <- Source files
|-- tests <- Unit tests
`-- testing <- Various dynamic testing files
