mattrobenolt / mattrobenolt/jinja2-cli
env parsing quirks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 610
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Fedora dumps multiline string data directly onto stdout for env with plain LF's:
$ env
FEDORA_CHANGELOG=* Sun Feb 1 2026 Bob <bob@bobsautoparts.test>
- Prototype
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/.venv/bin
VERBOSE=1
...
There is probably no safe, distro independent way to safely parse data piped in from env. Because the value may itself begin a line with <VAR>=.
Frankly, requiring the user to pipe env in, is needlessly laborious. And breaks native Windows.
Fortunately, there is a safer, better UX way:
- Query an environment variable
JINJA_ENV. - When
JINJA_ENVis present, then use the standard library to loop over environment variables and build up the data dictionary.
https://www.geeksforgeeks.org/python/python-os-getenv-method/
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the CLI code that currently reads or parses environment data piped from env, then inspect how Python's standard library exposes environment variables. Define the JINJA_ENV path described in the issue and verify that multiline values are handled without line parsing and that the behavior works on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100