From a268d4865593659124be7bcea65742a738b12486 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Wed, 3 Jul 2013 17:23:38 +0200 Subject: [PATCH] Add showcolors.bash --- .gitignore | 1 + doc/signify.txt | 6 +++--- showcolors.bash | 11 +++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100755 showcolors.bash diff --git a/.gitignore b/.gitignore index 5c89d5e..90c3f19 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ !README.md !doc/signify.txt !plugin/signify.vim +!showcolors.bash !signify.gif diff --git a/doc/signify.txt b/doc/signify.txt index 38743d3..addc25e 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -264,9 +264,9 @@ Personally I use (256 colors terminal): highlight SignifySignDelete cterm=bold ctermbg=237 ctermfg=167 highlight SignifySignChange cterm=bold ctermbg=237 ctermfg=227 -For Unix people there is a small script, showcolors.sh, in the repo that shows -all 256 colors available to the terminal. That makes picking the right numbers -much easier. +For Unix people there is a small script, showcolors.bash, in the repo that +shows all 256 colors available to the terminal. That makes picking the right +numbers much easier. ============================================================================== diff --git a/showcolors.bash b/showcolors.bash new file mode 100755 index 0000000..d64e1fc --- /dev/null +++ b/showcolors.bash @@ -0,0 +1,11 @@ +#!/bin/bash + +if ! hash tput 2>/dev/null; then + echo "I cannot find the 'tput' program." \ + 'You might find it in one of the ncurses packages.' >&2 + exit 1 +fi + +for i in {0..255}; do + tput setab $i && echo -n " $i " +done