diff options
Diffstat (limited to 'src/lib/libremessages')
-rwxr-xr-x | src/lib/libremessages | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libremessages b/src/lib/libremessages index 4bea486..151674b 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -58,12 +58,12 @@ print() { printf -- "$mesg\n" "$@" } -# Usage: whitespace-collapse <<<STRING +# Usage: whitespace_collapse <<<STRING # # Collapses whitespace on stadard I/O, similar to HTML whitespace # collapsing, with the exception that it puts two spaces between # sentences. It considers newline, tab, and space to be whitespace. -whitespace-collapse() { +whitespace_collapse() { [[ $# == 0 ]] || panic tr '\n' '\r' | sed -r \ @@ -79,7 +79,7 @@ whitespace-collapse() { # printing a paragraph of prose in --help text. prose() { [[ $# -ge 1 ]] || panic - local mesg="$(_ "$(whitespace-collapse <<<"$1")")"; shift + local mesg="$(_ "$(whitespace_collapse <<<"$1")")"; shift printf -- "$mesg" "$@" | fmt -u } @@ -88,7 +88,7 @@ prose() { # remaining lines. bullet() { [[ $# -ge 1 ]] || panic - local mesg="$(_ "$(whitespace-collapse <<<"$1")")"; shift + local mesg="$(_ "$(whitespace_collapse <<<"$1")")"; shift # Wrap the text to 71 columns; 75 (the default) minus a 4 column indent printf -- "$mesg" "$@" | fmt -u -w 71 | sed -e '1s/^/ - /' -e '2,$s/^/ /' } @@ -141,7 +141,7 @@ flag() { while [[ $# -gt 0 ]]; do local flag=$1 - local desc="$(_ "$(whitespace-collapse <<<"$2")")" + local desc="$(_ "$(whitespace_collapse <<<"$2")")" shift 2 local lines |