Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.6k
Closed
Description
Presumably as a result of3fe6b57, pandoc now prefers the default version of program to that in the shebang. For example, in arch,python
meanspython3
, so I put#!/usr/bin/env python2
at the top of my executable. But if invoked with--filter
, it still runspython
.
Example, let's call it "filter.py":
#!/usr/bin/env python2import pandocfilters as PFimport sysdef str_to_py_version(k, v, fmt, meta): if k == "Str": return PF.Str(sys.version.split()[0])if __name__ == '__main__': PF.toJSONFilter(str_to_py_version)
using development pandoc:
jkr@bucket $ echo "foo" | pandoc -t json | ./filter.py | pandoc -f json<p>2.7.6</p>jkr@bucket $ echo "foo" | pandoc --filter ./filter.py<p>3.4.0</p>
It should use the shebang in executables.
Metadata
Metadata
Assignees
Labels
No labels