From 1e0661c37bf40189c91e935811296b9919804075 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 11 Feb 2013 16:38:18 -0500 Subject: Added command line switches for running Lua code on startup. --- doc/10_Advanced.md | 3 ++- doc/13_Help.md | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/10_Advanced.md b/doc/10_Advanced.md index a54f7145..5ac24594 100644 --- a/doc/10_Advanced.md +++ b/doc/10_Advanced.md @@ -10,7 +10,8 @@ For available commands, see the [Lua API][]. Abbreviated commands for [`buffer`][], [`view`][] and [`gui`][] are available: the command `buffer:append_text('foo')` can be shortened to `append_text('foo')`. Therefore, use `_G.print()` for Lua's `print()` since [`gui.print()`][] is shortened to -`print()`. +`print()`. You can also run commands on startup using the `-e` and `--execute` +command line switches. ![Command Entry](images/commandentry.png) diff --git a/doc/13_Help.md b/doc/13_Help.md index f2c3dedc..673c2759 100644 --- a/doc/13_Help.md +++ b/doc/13_Help.md @@ -7,6 +7,7 @@ parameters. Switch |Arguments|Description -------------------|:-------:|----------- +`-e`, `--execute` | 1 |Run Lua [code][]. `-f`, `--force` | 0 |Forces [unique instance][]. `-h`, `--help` | 0 |Shows this. `-n`, `--nosession`| 0 |No [session][] functionality. @@ -15,6 +16,7 @@ Switch |Arguments|Description The help switch is unavailable in ncurses. +[code]: 10_Advanced.html#Command.Entry [unique instance]: 02_Installation.html#Single.Instance [session]: 04_WorkingWithFiles.html#Sessions [`_USERHOME`]: api/_G.html#_USERHOME -- cgit v1.2.3