[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Allow choosing an image via zenity when no arguments are provided (#408)
Eliot Miranda
notifications at github.com
Sat Jun 29 01:05:19 UTC 2019
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 or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/408#issuecomment-506914409
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190628/b877131a/attachment.html>
More information about the Vm-dev
mailing list