anki-code/xontrib-sh

Support updating environment variables

オープン

#7 opened on 2023/03/23

 (0 件のコメント) (1 件のリアクション) (0 人の担当者)Python (3 件のフォーク)github user discovery
good first issue

Repository metrics

Stars
 (65 個のスター)
PR merge metrics
 (30d に merged 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

コントリビューターガイド