summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2022-09-26 19:16:12 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2022-09-26 19:50:39 +0200
commitde0e3ff5f6483d358ca72bfe3c823a9a4bee273a (patch)
treec1826dc22b93d8ebca6cdbc0a8aca426eed1a757
parent62f0e9ffd9434da2142441b61fdc344f6a0058e8 (diff)
pandoc-lua: support more command line flags
-rw-r--r--doc/pandoc-lua.md18
-rw-r--r--pandoc-cli/pandoc-cli.cabal2
-rw-r--r--stack.yaml2
3 files changed, 18 insertions, 4 deletions
diff --git a/doc/pandoc-lua.md b/doc/pandoc-lua.md
index bacceeb1b..5badbfb32 100644
--- a/doc/pandoc-lua.md
+++ b/doc/pandoc-lua.md
@@ -21,6 +21,12 @@ If no script argument is given, then the script is assumed to be
passed in via *stdin*. Interactive mode is not supported at this
time.
+When called without the option `-E`, the interpreter checks for an
+environment variable `LUA_INIT` before running any argument. If
+the variable content has the format *`@filename`*, then
+`pandoc-lua` executes the file. Otherwise, `pandoc-lua` executes
+the string itself.
+
# OPTIONS
`-e stat`
@@ -34,8 +40,16 @@ time.
`-v`
: Show version information.
-`-i`, `-E`, `-W`
-: Not supported yet; print a warning to that effect.
+`-i`
+: Not supported yet; print a warning to that effect.
+
+`-E`
+: Ignore environment variables. This is not fully implemented
+ yet and only ignores the `LUA_INIT` variable. Other variables
+ like `LUA_PATH` and `LUA_CPATH` are **not** ignored.
+
+`-W`
+: Turn warnings on.
# AUTHORS
diff --git a/pandoc-cli/pandoc-cli.cabal b/pandoc-cli/pandoc-cli.cabal
index 5e0cf4fed..ddd2a9f52 100644
--- a/pandoc-cli/pandoc-cli.cabal
+++ b/pandoc-cli/pandoc-cli.cabal
@@ -58,7 +58,7 @@ executable pandoc
main-is: pandoc.hs
buildable: True
build-depends: pandoc,
- hslua-cli >= 1.0 && < 1.1
+ hslua-cli >= 1.1 && < 1.2
if flag(server)
build-depends: pandoc-server >= 0.1 && < 0.2,
wai-extra >= 3.0.24,
diff --git a/stack.yaml b/stack.yaml
index 1e3c2628a..3efb346a8 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -14,7 +14,7 @@ extra-deps:
- skylighting-format-latex-0.1
- hslua-2.2.1
- hslua-aeson-2.2.1
-- hslua-cli-1.0.0
+- hslua-cli-1.1.0
- hslua-classes-2.2.0
- hslua-core-2.2.1
- hslua-marshalling-2.2.1