nickgerace / gfold

CLI tool to help keep track of your Git repositories, written in Rust
https://crates.io/crates/gfold
Apache License 2.0
309 stars 20 forks source link

Allow `$HOME` and `~` in config #255

Open nickgerace opened 4 months ago

uncenter commented 3 days ago

Looking around online it seems that there are some complicated uses of the tilde that would be difficult to expand (https://www.gnu.org/software/libc/manual/html_node/Tilde-Expansion.html), and there aren't any great crates for this (https://blog.liw.fi/posts/2021/10/12/tilde-expansion-crates/ is a bit old but still accurate) right now. Might just be good to use a naive approach of replacing a starting ~/ or $HOME (just this one string, not arbitrary environment variables) with the current users home directory. I'd be happy to start working on this :)