Add zsh/lolcat.zsh rainbow helpers + document in README
This commit is contained in:
@@ -102,6 +102,45 @@ On top of stock YADR:
|
||||
- Misc: `.rainbow_config.json` (rainbowstream), `.nanorc`, `.selected_editor`,
|
||||
`.mplayer/config`, `.jigdo-lite`
|
||||
|
||||
## Rainbow output (lolcat)
|
||||
|
||||
`zsh/lolcat.zsh` wires [lolcat](https://github.com/jaseg/lolcat) (Debian's
|
||||
`/usr/games/lolcat`, the truecolor C build) into a few shell helpers. lolcat
|
||||
auto-detects a tty — it colorizes straight to the terminal but passes text
|
||||
through plain when piped onward, so use `-f`/`--force` to colorize mid-pipeline.
|
||||
|
||||
### Opt-in, per command
|
||||
|
||||
Prefix any command to rainbow its output:
|
||||
|
||||
```sh
|
||||
lol fastfetch
|
||||
lol git log --oneline
|
||||
lol ls -C # -C keeps columns: a piped ls otherwise goes single-column
|
||||
lolf git diff | less -R # force color so it survives down a pipeline
|
||||
```
|
||||
|
||||
### Shortcuts
|
||||
|
||||
```sh
|
||||
rcat file.txt # rainbow cat
|
||||
rls -la # rainbow ls, columns preserved
|
||||
some-cmd | rless # rainbow + pager (less -R)
|
||||
```
|
||||
|
||||
### Session toggle
|
||||
|
||||
Rainbow *all* shell stdout until you turn it off:
|
||||
|
||||
```sh
|
||||
rainbow_on # everything is rainbow now
|
||||
...
|
||||
rainbow_off # back to normal
|
||||
```
|
||||
|
||||
Novelty only: it garbles full-screen/interactive programs (vim, less, htop,
|
||||
fzf, ssh) and the prompt, and buffers streaming output. Doesn't touch stderr.
|
||||
|
||||
## Upstream
|
||||
|
||||
Base is [skwp/dotfiles][yadr] (YADR — Yet Another Dotfiles Repo). All credit
|
||||
|
||||
Reference in New Issue
Block a user