anki-code/xontrib-sh

Support updating environment variables

开放

#7 创建于 2023年3月23日

 (0 条评论) (1 个反应) (0 位负责人)Python (3 个派生)github user discovery
good first issue

仓库指标

星标
 (65 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南