Shopify / Shopify/shadowenv

`env/prepend-to-pathlist` doesn't undo when it adds a duplicate

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
458
Forks
22
PR merge metrics
No merged PRs in 30d

Description

$ export VAR=a:b:c:d
$ cat inner/.shadowenv.d/500_custom.lisp
(env/prepend-to-pathlist "VAR" "c")
$ cd inner
activated shadowenv
$ echo $VAR
c:a:b:c:d
$ cd ..
$ echo $VAR
c:a:b:c:d

Undoing this properly would also require similar richer undo data including indexes as described in #16.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing env/prepend-to-pathlist from the example in inner/.shadowenv.d/500_custom.lisp, then read #16 for the richer undo data and index handling it describes. Done means leaving the directory restores VAR to its original value and duplicate entry positions, rather than retaining the prepended value.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.