mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add '-c, --color' option
Allow user to select which ANSI color code to use to colorize the tio text. To successfully set the color the color code must be in the range 0..255. If color code is negative tio will print all available ANSI colors. The default color is changed to bold white to make tio defaults usable for most users, including color blind users.
This commit is contained in:
parent
32e853e46e
commit
274cb63197
7 changed files with 55 additions and 16 deletions
|
|
@ -22,6 +22,7 @@ _tio()
|
|||
-v --version \
|
||||
-t --timestamp \
|
||||
-L --list-devices \
|
||||
-c --color \
|
||||
-h --help"
|
||||
|
||||
# Complete the arguments to the options.
|
||||
|
|
@ -75,6 +76,10 @@ _tio()
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
-c | --color)
|
||||
COMPREPLY=( $(compgen -W "$(seq 0 255)" -- ${cur}) )
|
||||
return 0
|
||||
;;
|
||||
-v | --version)
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue