Hi Leon, the only way I know of doing this is to expand $@ within double quotes at the point of command dispatch. Here's the illustration of the magic incantation:

ZENITY_ARGS=
echo 'YES!!!'
for a in ${ZENITY_ARGS:="$@"}; do
echo $a
done

so the right form would be

ZENITY_ARGS=
if [ $# -eq 0 && which zenity &>/dev/null ]; then
ZENITY_ARGS=$(zenity --title 'Select an image' --file-selection --file-filter '.image' --file-filter '')
fi

LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" ${ZENITY_ARGS:="$@"}


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.