https://github.com/markcial/cprintf
Printf with colors
https://github.com/markcial/cprintf
Last synced: 2 months ago
JSON representation
Printf with colors
- Host: GitHub
- URL: https://github.com/markcial/cprintf
- Owner: Markcial
- License: mit
- Created: 2016-05-19T10:36:45.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T08:46:21.000Z (over 6 years ago)
- Last Synced: 2025-02-05T03:34:20.608Z (4 months ago)
- Language: Shell
- Size: 94.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status][travis-badge]][travis-link]
[![Slack Room][slack-badge]][slack-link]# cprintf
Printf with colors
## Install
With [fisherman]
```
fisher cprintf
```## Usage
```fish
cprintf "template" $array
```
cprintf is intended to work as a normal [printf]().
But with a nifty plus, it can accept a special format for coloring.For foreground colors use the open `fg:color` tag and close it with its corresponding `fg`.
![Foreground format][fg-styling]
For background colors use the open `bg:color` and end the coloring with its `bg` ending tag
![Background format][bg-styling]
It can be combined too used as a regular printf with params
![Combined format][combined-styling]
[travis-link]: https://travis-ci.org/fisherman/cprintf
[travis-badge]: https://img.shields.io/travis/fisherman/cprintf.svg
[slack-link]: https://fisherman-wharf.herokuapp.com
[slack-badge]: https://fisherman-wharf.herokuapp.com/badge.svg
[fisherman]: https://github.com/fisherman/fisherman[fg-styling]: docs/fg_styling.png
[bg-styling]: docs/bg_styling.png
[combined-styling]: docs/combined_styling.png