Command line args (was: API Changes)

From: Robert <>
Date: Wed, 16 Jun 2010 11:47:26 +0200

On Tue, Jun 15, 2010 at 6:29 PM, Robert <> wrote:
> On Mon, Jun 14, 2010 at 3:49 PM, mitchell <> wrote:
>>> Command line arguments - would you consider adding command line
>>> switches for setting the location of userhome and
>>> loading? This would be very useful now that I have two incompatible
>>> Textadept versions. Possibly,
>>> -p or --plain for loading Textadept without userhome
>>> -u <path> or --userhome <path> for setting the userhome location
>> Submit a patch :)
> I got something [1] working, my problem now is that RESETTING seems
> not to be available in
> core/init.lua, so after a reset() I get the default .textadept.
> "args" seem to persist a resetting so I could leave it there to
> re-read after a reset.

I updated this. I put the argument parsing code in a separate file in
core that creates flags that can be processed later. The arg table
persists resetting so they are processed again after a reset.
What do you think? Could that be the way to go?
I tried adding a help text as well. However, if I use quit() I get a
segmentation fault if I use it too early or the Textadept window is
created and then closed.

Received on Wed 16 Jun 2010 - 05:47:26 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:48:12 EST