uv
7bd0d97c - feat: add comma value-delimiter to with argument in tool run args to allow for multiple arguments in with flag (#7909)

Comment changes are shownComment changes are hidden
Commit
223 days ago
feat: add comma value-delimiter to with argument in tool run args to allow for multiple arguments in with flag (#7909) This is to address my own issue #7908 ## Summary This change makes use of the `clap` value_delimiter parser to populate the `with` `Vec<String>` which currently can either only be empty or with 1 value for each `--with` flag. This makes use of the current code structure but allows for multiple arguments with a single `--with` flag. <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan Can be tested with the following CLI: ```bash target/debug/uv tool run --with numpy,polars,matplotlib ipython -c "import numpy;import polars;import matplotlib;" ``` And former behavior of multiple `--with` flags are kept ```bash target/debug/uv tool run --with numpy --with polars --with matplotlib ipython -c "import numpy;import polars;import matplotlib;" ``` <!-- How was it tested? --> --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Author
Parents
  • crates
    • uv-cli/src
      • File
        lib.rs
    • uv/tests
      • File
        tool_run.rs