Skip to content

v1.4.0

Choose a tag to compare

@maxkagamine maxkagamine released this 28 Dec 17:32
· 15 commits to master since this release
a0b91ec
  • Replaced the "Make 'Open with Code' open in WSL" installer option with a "Make launching VS Code from Explorer open in WSL" which includes double-clicking on files in addition to the context menu items.

    • Enabling this feature will disable the relevant options in VS Code's own installer to prevent updates from overwriting our changes. Disabling the feature or uninstalling wsl-tools reverts everything back.
    • Now launches VS Code the same way as the code shell script, using the (undocumented) --file-uri & --folder-uri options, as otherwise VS Code tries to determine if a path is a directory or not simply by whether it contains a dot...
    • If wslpath fails, it will now open in a local window instead of erroring (#3)
  • recycle --rm is now viable as a shell alias for rm:

    • When run with --rm, files in WSL will be deleted Linux-side instead of going through the winapi. This greatly improves performance when deleting files in Linux and allows for use of sudo.
    • Added an -r/--recursive option, without which --rm will error if any path is a directory.
      • Also added a check to prevent deleting /, like rm.

    Benchmark versus rm and previous version:
    hyperfine \
      --export-markdown benchmark.md \
      --sort mean-time \
      --warmup 1 \
      --runs 5 \
      --shell none \
      -L file /mnt/c/Users/max/foo,/home/max/foo \
      -p 'touch {file}' \
      -C 'sleep 0.1s' \
      'rm {file}' \
      'v1.3.0/recycle --rm {file}' \
      'v1.4.0/recycle --rm {file}'
    
    Command Mean [ms] Min [ms] Max [ms] Relative
    🗑️ rm /home/max/foo 0.8 ± 0.1 0.7 0.9 1.00
    🗑️ rm /mnt/c/Users/max/foo 1.9 ± 0.1 1.8 2.0 2.42 ± 0.30
    🗑️ v1.4.0/recycle --rm /home/max/foo 6.8 ± 0.2 6.6 7.1 8.91 ± 1.00
    ♻️ v1.4.0/recycle --rm /mnt/c/Users/max/foo 71.2 ± 0.5 70.6 71.8 92.75 ± 10.08
    ♻️ v1.3.0/recycle --rm /mnt/c/Users/max/foo 71.8 ± 1.4 70.8 74.3 93.55 ± 10.32
    🗑️ v1.3.0/recycle --rm /home/max/foo 73.2 ± 1.7 71.6 75.5 95.37 ± 10.59
  • When running the Windows exe, use an absolute path instead of relying on PATH. (This commit was cherry-picked onto v1.3.0 in order to run the above benchmark.)

  • Enabled dark mode in installer