From b07f84783a9b3e4e799e93173977882de6c16fa8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Jan 2014 17:09:30 -0500 Subject: src/lib/: misc touch-up --- src/lib/conf.sh | 4 ++-- src/lib/libremessages | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/conf.sh b/src/lib/conf.sh index 4445bef..6b1ab49 100644 --- a/src/lib/conf.sh +++ b/src/lib/conf.sh @@ -112,7 +112,7 @@ load_files() { # Check whether the variables listed are properly set. # If not, it prints a message saying to set them in the configuration file(s) # for $slug. -check_vars() { +check_vars() ( local slug=$1; shift local ret=0 @@ -134,7 +134,7 @@ check_vars() { if [[ $ret != 0 ]]; then return 1 fi -} +) # Usage: get_var # Does not work with arrays diff --git a/src/lib/libremessages b/src/lib/libremessages index 8766578..8e48c3b 100755 --- a/src/lib/libremessages +++ b/src/lib/libremessages @@ -88,8 +88,6 @@ bullet() { # bullet. flag() { [[ $# == 2 ]] || panic - local n=' -' local flag=$1 local desc="$(_ "$(_html_whitespace_collapse <<<"$2")")" @@ -99,7 +97,7 @@ flag() { done local lines - IFS=$n lines=($(fmt -u -w $((73-indent)) <<<"$desc")) + IFS=$'\n' lines=($(fmt -u -w $((73-indent)) <<<"$desc")) local line for line in "${lines[@]}"; do printf " %-${indent}s %s\n" "$flag" "$line" -- cgit v1.2.3-54-g00ecf