Hi Vladimir,
sorry for the late response.
The code you gave works fine on linux (development branch)
! cmd2.factor
USING: command-line namespaces prettyprint ;
IN: cmd2
: cmd-line ( -- ) command-line get . ;
MAIN: cmd-line
Here are the deploy flags I used to deploy the app:
USING: tools.deploy.config ;
H{
{ deploy-ui? f }
{ deploy-word-defs? f }
{ deploy-threads? f }
{ deploy-math? f }
{ deploy-io 2 }
{ deploy-reflection 3 }
{ deploy-unicode? f }
{ "stop-after-last-window?" t }
{ deploy-console? f }
{ deploy-word-props? f }
{ deploy-c-types? f }
{ deploy-name "cmd2" }
}
I generated them with the deploy-tool, asked for the prettyprinter to
be included.
jon@zebu 19:11 % ./cmd2 foo bar -foobar a "foo bar"
~/factor/cmd2
{ "foo" "bar" "-foobar" "a" "foo bar" }
If you have a different result with the same code and the same deploy
flags, it's probably a bug. What platform are you on ? What version of
factor are you using ?
Cheers,
Jon
On Sat, Feb 26, 2011 at 5:30 AM, Vladimir Darmanian
<[email protected]> wrote:
> Hi,
>
> How do you work with command line arguments of a deployed standalone app?
> The command-line vocab seems to only apply when running the listener - or am
> I missing something?
> I have a simple app as follows:
> : cmd-line ( -- ) command-line get . ;
> or even
> : cmd-line ( -- ) (command-line) . ;
>
> MAIN: cmd-line
>
> running `./test -foo -no-bar blah` doesn't output anything.
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk