shellexpand icon indicating copy to clipboard operation
shellexpand copied to clipboard

Tilde expand windows paths with backward slashes

Open mjptree opened this issue 3 years ago • 2 comments

The following tilde expansion check is insufficient on windows if the input path uses backslash notation:

https://github.com/netvl/shellexpand/blob/e707d07a0a2638df7ab26b152f814e80ce3b3992/src/lib.rs#L665-L690

Specifically the test:

        if input_after_tilde.is_empty() || input_after_tilde.starts_with("/") {

The path "~/.cargo" e.g. would expand correctly, however "~\\.cargo" would fail to expand correctly.

mjptree avatar Jan 28 '22 00:01 mjptree

Hi. As discussed in https://github.com/netvl/shellexpand/issues/17 I am taking over maintenance of this crate. The new repository is here: https://gitlab.com/ijackson/rust-shellexpand

I think I agree with this bug report. I have reproduced it here https://gitlab.com/ijackson/rust-shellexpand/-/issues/4 in the new repo. I'm afraid I don't have time to fix it right now but I would welcome an MR.

ijackson avatar Aug 03 '22 15:08 ijackson

Hi. As discussed in https://github.com/netvl/shellexpand/issues/17 I am taking over maintenance of this crate. The new repository is here: https://gitlab.com/ijackson/rust-shellexpand

this should really go into the readme

Trolldemorted avatar Nov 12 '23 10:11 Trolldemorted