Rework color option

Rework the color option to support setting ANSI color code values
ranging from 0..255 or "none" for no color or "list" to print a list of
available ANSI colors codes.

Also, disables color when piping.
This commit is contained in:
Martin Lund 2022-06-08 16:15:17 +02:00
parent 2519e2081a
commit 46b5783789
8 changed files with 67 additions and 32 deletions

View file

@ -84,7 +84,7 @@ _tio()
return 0
;;
-c | --color)
COMPREPLY=( $(compgen -W "$(seq 0 255)" -- ${cur}) )
COMPREPLY=( $(compgen -W "$(seq 0 255) none list" -- ${cur}) )
return 0
;;
-S | --socket)