|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -# Filename: bashutils-terminfo.sh |
| 3 | +# Filename: bashful-terminfo.sh |
4 | 4 | # Description: Sets terminal strings for things like color, bold, etc. |
5 | 5 | # Maintainer: Jeremy Cantrell <jmcantrell@gmail.com> |
6 | | -# Last Modified: Tue 2010-02-09 23:47:47 (-0500) |
| 6 | +# Last Modified: Wed 2010-02-10 10:26:15 (-0500) |
7 | 7 |
|
8 | | -# autodoc-begin bashutils-autodoc {{{ |
| 8 | +# autodoc-begin bashful-terminfo {{{ |
9 | 9 | # |
10 | | -# The autodoc library provides a way to extract documentation from scripts. |
| 10 | +# The terminfo library provides variables for altering the appearance of |
| 11 | +# terminal output (bold, italics, underline, colors, etc). |
11 | 12 | # |
12 | | -# Normally, I would prefer to use getopts to setup a -h/--help option, but in |
13 | | -# some cases it isn't practical or it can conflict with other functions. This |
14 | | -# provides a nice alternative with no side-effects. |
15 | | -# |
16 | | -# Within the script, a section of documentation is denoted like this: |
17 | | -# |
18 | | -# # autodoc-begin NAME |
19 | | -# # |
20 | | -# # DOCUMENTATION TEXT GOES HERE |
21 | | -# # |
22 | | -# # autodoc-end NAME |
23 | | -# |
24 | | -# autodoc-end bashutils-autodoc }}} |
| 13 | +# autodoc-end bashful-terminfo }}} |
25 | 14 |
|
26 | 15 | if (( ${BASH_LINENO:-0} == 0 )); then |
27 | | - source bashutils-autodoc |
| 16 | + source bashful-autodoc |
28 | 17 | autodoc_execute "$0" "$@" |
29 | 18 | exit |
30 | 19 | fi |
31 | 20 |
|
32 | | -[[ $BASHUTILS_TERMINFO_LOADED ]] && return |
| 21 | +[[ $BASHFUL_TERMINFO_LOADED ]] && return |
33 | 22 |
|
34 | 23 | term_reset=$(tput sgr0 2>/dev/null) |
35 | 24 | term_bold=$(tput bold 2>/dev/null) |
@@ -58,4 +47,4 @@ if (( $(tput colors) >= 8 )); then |
58 | 47 | term_bg_white=$(tput setbf 7 2>/dev/null) |
59 | 48 | fi |
60 | 49 |
|
61 | | -BASHUTILS_TERMINFO_LOADED=1 |
| 50 | +BASHFUL_TERMINFO_LOADED=1 |
0 commit comments