Add showcolors.bash

This commit is contained in:
Marco Hinz 2013-07-03 17:23:38 +02:00
parent 039f361ff7
commit a268d48655
3 changed files with 15 additions and 3 deletions

1
.gitignore vendored
View File

@ -6,4 +6,5 @@
!README.md !README.md
!doc/signify.txt !doc/signify.txt
!plugin/signify.vim !plugin/signify.vim
!showcolors.bash
!signify.gif !signify.gif

View File

@ -264,9 +264,9 @@ Personally I use (256 colors terminal):
highlight SignifySignDelete cterm=bold ctermbg=237 ctermfg=167 highlight SignifySignDelete cterm=bold ctermbg=237 ctermfg=167
highlight SignifySignChange cterm=bold ctermbg=237 ctermfg=227 highlight SignifySignChange cterm=bold ctermbg=237 ctermfg=227
For Unix people there is a small script, showcolors.sh, in the repo that shows For Unix people there is a small script, showcolors.bash, in the repo that
all 256 colors available to the terminal. That makes picking the right numbers shows all 256 colors available to the terminal. That makes picking the right
much easier. numbers much easier.
============================================================================== ==============================================================================

11
showcolors.bash Executable file
View File

@ -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