<p>Hi Leon,</p>
<pre><code>alas I think this way will fail:
</code></pre>
<p>if [ $# -eq 0 && which zenity &>/dev/null ]; then<br>
VM_ARGS=$(zenity --title 'Select an image' --file-selection --file-filter '<em>.image' --file-filter '</em>')<br>
else<br>
VM_ARGS=$@<br>
fi</p>
<pre><code>LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" exec $GDB "$BIN/squeak" "${VM_ARGS}"
</code></pre>
<p>That's illustrated by the following test programme:<br>
-----------8<-------------<br>
#!/bin/bash<br>
ARGS=$@<br>
echo; echo A<br>
for a in "$ARGS"; do<br>
echo $a<br>
done<br>
ARGS="$@"<br>
echo; echo B<br>
for a in "$ARGS"; do<br>
echo $a<br>
done<br>
ARGS="$@"<br>
echo; echo C<br>
for a in $ARGS; do<br>
echo $a<br>
done<br>
ARGS=$@<br>
echo; echo D<br>
for a in $ARGS; do<br>
echo $a<br>
done<br>
-----------8<-------------</p>
<p>If one invokes this with ./testshellargs.sh 'arg one' 'arg two' then the output is</p>
<p>A<br>
arg one arg two</p>
<p>B<br>
arg one arg two</p>
<p>C<br>
arg<br>
one<br>
arg<br>
two</p>
<p>D<br>
arg<br>
one<br>
arg<br>
two</p>
<p>We have to find some way of writing this so that the output is<br>
YES!!!<br>
arg one<br>
arg two</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/408?email_source=notifications&email_token=AIJPEWZLOC4E25N3NBWIGWDP42WWBA5CNFSM4HYXR4FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3OEGA#issuecomment-506913304">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWYKYPUDZ53NXBMICDTP42WWBANCNFSM4HYXR4FA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AIJPEW5IEAQCJINH5OXFKWLP42WWBA5CNFSM4HYXR4FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3OEGA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/408?email_source=notifications\u0026email_token=AIJPEWZLOC4E25N3NBWIGWDP42WWBA5CNFSM4HYXR4FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3OEGA#issuecomment-506913304",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/408?email_source=notifications\u0026email_token=AIJPEWZLOC4E25N3NBWIGWDP42WWBA5CNFSM4HYXR4FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3OEGA#issuecomment-506913304",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>