#!/bin/sh
domain=${NIDOMAIN-.}
path=`dread niTools cwd | awk '{print $3}'`
echo --- "$path"
if [ "$1""x" = "x" ]
then
	echo -n "name: "
	read name
else
	name="$1"
	shift
fi
oldval=`niutil -read $domain $path | grep "^${name}: " | sed "s/^${name}: //"`
if [ "$oldval""x" != "x" ]
then
	echo old values: "$oldval"
fi
if [ "$1""x" = "x" ]
then
	echo -n "values: "
	read values
	set "$values"
fi
niutil -destroyprop "$domain" "$path" "$name" 2>/dev/null
niutil -createprop "$domain" "$path" "$name" "$@"
