aboutsummaryrefslogtreecommitdiff
path: root/dbook
diff options
context:
space:
mode:
Diffstat (limited to 'dbook')
-rwxr-xr-xdbook12
1 files changed, 6 insertions, 6 deletions
diff --git a/dbook b/dbook
index 3ea4128..126626c 100755
--- a/dbook
+++ b/dbook
@@ -109,19 +109,19 @@ parse_data()
[ -z "$line" ] && continue
_key="${line%%|*}"
- _value="${line##*|}"
_key="$(trim "$_key")"
- _value="$(trim "$_value")"
case "$_key" in
#*) continue
esac
if [ "$1" = "getval" ]; then
- if [ "$2" = "$_key" ]; then
- echo "$_value"
- return 0
- fi
+ [ "$2" != "$_key" ] && continue
+
+ _value="${line##*|}"
+ _value="$(trim "$_value")"
+ echo "$_value"
+ return 0
else
echo "$(load_icon "$_value")" "$_key"
fi