pandoc/test/command/lua-pandoc-state.md
John MacFarlane 0bed0ab5a3 Use XDG data directory for user data directory.
Instead of `$HOME/.pandoc`, the default user data directory is
now `$XDG_DATA_HOME/pandoc`, where `XDG_DATA_HOME` defaults to
`$HOME/.local/share` but can be overridden by setting the environment
variable.

If this directory is missing, then `$HOME/.pandoc` is searched
instead, for backwards compatibility.  However, we recommend
moving local pandoc data files from `$HOME/.pandoc` to
`$HOME/.local/share/pandoc`.

On Windows the default user data directory remains the same.

Closes #3582.
2019-03-02 15:03:59 -08:00

276 B

% pandoc --lua-filter=command/lua-pandoc-state.lua --data-dir=foo
Hello
^D
   # input files: 0
     output file: nil
# request header: 0
   resource path: .
      source URL: nil
   user data dir: defined
           trace: false
       verbosity: WARNING
<p>Hello</p>