aboutsummaryrefslogtreecommitdiff
path: root/bin/app-conf
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-10-21 23:28:03 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-10-21 23:28:03 +0200
commit22f0f794ac4e40866c5d390a7b27b8bd6713e681 (patch)
treeda5f9febae11d7819a0d908b9505997575b04628 /bin/app-conf
parent989edff55111db3b457c9e04f3abf296e6ac555c (diff)
downloadapp.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.tar.gz
app.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.tar.bz2
app.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.tar.xz
app.sh-22f0f794ac4e40866c5d390a7b27b8bd6713e681.zip
o Removing silly formatting that left extra spaced at the end of
lines. o Fixing bug in app-conf get subcommand that would only return the first part of values with an equals sign. o Makding sure $HOME is always set.
Diffstat (limited to 'bin/app-conf')
-rwxr-xr-xbin/app-conf8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/app-conf b/bin/app-conf
index 88498e9..cd127a2 100755
--- a/bin/app-conf
+++ b/bin/app-conf
@@ -28,7 +28,7 @@ format_conf() {
local IFS==
while read key value
do
- printf "%-20s %-20s" "$key" "$value"
+ printf "%-20s %s" "$key" "$value"
echo
done
}
@@ -140,12 +140,12 @@ case "$command" in
usage
fi
- app-cat-conf -l "$location" -n "$1" | cut -f 2 -d = | format_conf | sed "s, *$,,"
+ app-cat-conf -l "$location" -n "$1" | cut -f 2- -d =
;;
list)
if [ $# -gt 0 ]
then
- usage "Extra options."
+ usage "Extra arguments."
fi
app-cat-conf -l "$location" | format_conf
@@ -153,7 +153,7 @@ case "$command" in
set)
if [ $# -ne 2 ]
then
- usage
+ usage "Expected exactly two arguments"
fi
conf_set "$file" "$1" "$2"