anki-code / anki-code/xontrib-sh

Support updating environment variables

Open
#7 0 comments 1 reaction 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
65
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The idea:
1. Get `prev_env = $(env)` before running the sh-command
2. Run sh-command. Example `! export QWE=123`.
3. Add saving env at the end of command: `! export QWE=123 ; env > /tmp/post_env`.
4. By comparing `prev_env` and `post_env` update the environment in the current session i.e. `$QWE='123'`

## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍 comment**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.