feature: custom install location support#397
Conversation
As the location for `_pure_init.fish` is stored inside a `_pure*` variable, erasing the variable before deleting files would fail to delete `_pure*` files as the variable no longer exists, and the files would not be able to be located. As such, we delete the files before erasing the variables to properly delete them.
conf.d/_pure_init.fish
Outdated
| cp $_pure_root/functions/fish_prompt{,.pure-backup}.fish | ||
| cp $_pure_root/functions/fish_title{,.pure-backup}.fish |
There was a problem hiding this comment.
I'm not too sure this is the right thing to do for these, as backing up into the _pure_root, which might not be the __fish_config_dir, might not be particularly visible to the user. I wonder if making a backup into __fish_config_dir makes sense here, especially if the user already has their own fish_prompt and fish_title
There was a problem hiding this comment.
Yep, those lines are useless and do not match the comment. You can remove them
There was a problem hiding this comment.
The failing tests are due to the removal of these lines. Did I misunderstand and it's my changes in these lines that should be removed?
|
Hi, could I get a review on this PR? Thanks |
|
Hello, thanks for your work and patience 🙏. |
|
@benedictleejh Hello, I tested it. Works fine! |
conf.d/_pure_init.fish
Outdated
| cp $_pure_root/functions/fish_prompt{,.pure-backup}.fish | ||
| cp $_pure_root/functions/fish_title{,.pure-backup}.fish |
There was a problem hiding this comment.
Yep, those lines are useless and do not match the comment. You can remove them
I've added a note as suggested in efeba89. If there's anything that should be noted that I've missed, do let me know. |
related: fixes #394
Adds support for installing pure into a custom install location. As suggested in #394, a variable
_pure_rootis added to_pure_init.fishto determine the install location, and all instances of__fish_config_pathis replaced by_pure_root, so thesourcecommands in_pure_init.fishwill work correctly regardless of where pure is installed into. This allows pure to work when installed into a custom fisher install location.How to try this PR?
Acceptance Checks
conf.d/pure.fish][default] for:tests/feature_name.test.fish;The unchecked items are not relevant to this PR