You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running a reinit and giving it a path starting with a tidle ~ bugs out.
Details
>pwd
/home/me/foo
> opam init --reinit
[...]
Do you want opam to configure bash?
1. Yes, update ~/.profile
2. ...
3. ...
4. Specify another config file to update instead
> 4
Enter the name of the file to update:
If you enter a simple filename opam-thingy.sh, it asks to update ~/opam-thingy.sh ✅
If it's a qualified path like /etc/foobar/opam-thingy.sh, it asks to update exactly that ✅
If it's a relative path like ./opam-thingy.sh, it expands the relative path: ~/foo/opam-thingy.sh ✅
If it's a path starting with a tilde like ~/.camels/opam-thingy.sh, it doubles the tilde: ~/~/.camels/opam-thingy.sh ❎
Bonus: if it's a path starting with "$HOME" it won't expand the variable: ~/'$HOME'/opam-thingy.sh. But really, who would do that.
The text was updated successfully, but these errors were encountered:
Thanks for the report. That sounds like a pretty straightforward bug indeed.
It looks to me fairly straightforward to fix too, do you want to have a go at it?
Issue description
Running a reinit and giving it a path starting with a tidle
~
bugs out.Details
opam-thingy.sh
, it asks to update~/opam-thingy.sh
✅/etc/foobar/opam-thingy.sh
, it asks to update exactly that ✅./opam-thingy.sh
, it expands the relative path:~/foo/opam-thingy.sh
✅~/.camels/opam-thingy.sh
, it doubles the tilde:~/~/.camels/opam-thingy.sh
❎~/'$HOME'/opam-thingy.sh
. But really, who would do that.The text was updated successfully, but these errors were encountered: