oh-my-fish / theme-budspencer

A theme for nerds, makes fish even more powerful. It's equipped with a hell of a lot of nice functions and key bindings to speed up your workflow.
MIT License
106 stars 42 forks source link

Move files to be compatible with Fisher standards #79

Closed g00ntar closed 3 years ago

g00ntar commented 3 years ago

Fisher drops *.fish files outside functions folder.

ngmoviedo commented 3 years ago

You may need to do something about the README too, as it is shown when calling budspencer_help. I think I might have solved that too in my PR #76. I ended up solving a couple of issues I had with this theme too, although I'm not sure how general they were. I guess that maintaining compatibility with OMF and Fisher at the same time might be out of the scope of this project. But I'll try to maintain my Fisher-compatible fork, as I really like this prompt. Maybe you can check it out, to check if it works alright.

ngmoviedo commented 3 years ago

It is necessary to move the README.md file, as it is shown when you execute budspencer_help. If it was installed with fisher, you'll get the following error:

/themes/budspencer/README.md wasn't found.

First, that directory won't even exist if you're using fisher, and the README.md doesn't even get downloaded by fisher. This can be solved by moving the README to the functions directory and modifying the code so it points to the right directory when calling budspencer_help.

scorphus commented 3 years ago

Got it, @ngmoviedo. Can you please confirm if it works on Fisher after the last change? Thanks in advance.

p.s.: we can solve #75 with another PR (or in even in #76)

ngmoviedo commented 3 years ago

The README.md get downloaded by fisher now, but it's still not displayed when executing budspencer_help. This happens because the function, defined in fish_prompt.fish looks for the readme in $OMF_PATH/themes/budspencer/README.md, so it is able to locate it only for OMF users. Here are the relevant lines. I think something like this would solve the issue. Sorry for the links, I'm not sure how to comment the code on the PR fir a the file that was only moved without changes.

P.S.: I don't know exactly what changed, but I can't reproduce #75 anymore. I'll close that issue and #76.

ngmoviedo commented 3 years ago

Here are the relevant lines. I think something like this would solve the issue.

Sorry, I forgot about the last link when I deleted the fork. I created a PR with said change.

ngmoviedo commented 3 years ago

Updated the PR. Noticed that it is not enough for the readme_file variable to be set locally with set -l. It needs to be exported with set -x.

scorphus commented 3 years ago

I thought of a way to solve the README.md problem. But I think that is a subject for another PR. Let's get this one merged first 🙂

scorphus commented 3 years ago

So, without considering budspencer_help, can you please confirm this works on Fisher, @ngmoviedo? Thanks.

ngmoviedo commented 3 years ago

Yes, I haven't noticed any other problem at all.

scorphus commented 3 years ago

Thank you, @ngmoviedo! 🙌