Thanks for the pointer Thomas.
That looks like not exactly what I am thinking of - it seems to be oriented
towards "command<return>argument1<return>argument2<return>" in the
minibuffer. I confess I have never used a Leo command that operates in that
way! my loss, I am sure.
I am thinking more of "command arg1 arg2 arg3<return>" - so
'non-interactive', perhaps. But perhaps the available mechanisms will
provide that, Ii will have a read.
Regards
J^n
On Monday, December 9, 2024 at 9:58:06 PM UTC [email protected] wrote:
> There's a node in LeoDocs about getting arguments. Look for the headline
> "Getting interactive input in scripts and commands".
>
> sys.argv will give you the arguments that the Python interpreter received
> at startup.
>
> Another way I've passed arguments to a script is via the clipboard, but of
> course you have to get them into the clipboard first.
>
> On Monday, December 9, 2024 at 4:36:37 PM UTC-5 jkn wrote:
>
>> I've been meaning to ask this for ever...Is there a way to pass
>> argument(s) to leo @command-s?
>>
>> If I have a node like
>>
>> @command test_args
>> import sys
>> g.es(sys.argv))
>>
>> and run "test_args 1 2 abcd"
>>
>> none of "1 2 abcd" get printed - only sys.argv from the initial
>> invocation of Leo.
>>
>> is there a way for something like this to work? Apologies if it is
>> already documented, I cannot find it.
>>
>> Thanks
>> Jon N
>>
>>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/leo-editor/f23aec79-d4e4-4fc0-a44d-3f38d662d4c0n%40googlegroups.com.