It seems to me like a bizarre way to do things but, hey, to each his own. Maybe something like this is the intention:
Code:
ls /home/garry/Images/backgrounds
print -n "Background file Name: "; read name
if [[ $name = "" ]]; then
print "No change, exiting."
else
display -window root /home/garry/Images/backgrounds/${name}
fi