Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local theme created using scaffold can not be used with omf install <localtheme> #401

Closed
lachenmayer opened this issue Sep 12, 2016 · 9 comments
Labels

Comments

@lachenmayer
Copy link

Hiya, installing fish on a new laptop, shows me how outdated all my dotfiles are on my old machine ;)

To reproduce:

omf new theme foobar
omf install foobar

expected: new theme is used
actual:

fatal: repository 'foobar' does not exist
Could not install package foobar.

screen shot 2016-09-12 at 17 52 43

Manually editing the theme file does work as expected.

macOS 10.11.6 / fish 2.3.1 / omf 2

@lachenmayer lachenmayer changed the title Local theme created using scaffold can not be used with omf theme <localtheme> Local theme created using scaffold can not be used with omf install <localtheme> Sep 12, 2016
@oranja
Copy link
Contributor

oranja commented Sep 13, 2016

I'm a little confused by these instructions.
Did OMF ever support installing a local package just by name? My guess would be "no".
As far as I can recall, you always need some git repository to point at. And while you can technically create a URL for a local git repository, the instructions here don't even point you in the right direction.

Offline package/theme install is something we need to get on top of. Feel free to suggest a PR.

@lachenmayer
Copy link
Author

I don't know, the last version of oh-my-fish I've used is clearly the
"legacy" version. In that, I recall manually sourcing all the relevant
fish_prompt/etc files manually.
Will take a closer look at this later this week - there shouldn't be any
need to create a git repo, it works just fine when I manually edit the
"theme" file.
Thanks for taking a look.

On Tue, Sep 13, 2016 at 8:08 AM Itzik Ephraim notifications@github.com
wrote:

I'm a little confused by these instructions.
Did OMF ever support installing a local package just by name? My guess
would be "no".
As far as I can recall, you always need some git repository to point at.
And while you can technically create a URL for a local git repository, the
instructions here don't even point you in the right direction.

Offline package/theme install is something we need to get on top of. Feel
free to suggest a PR.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#401 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACW1iHmGWmJie7WGoGbh4n180vviJU-ks5qpkvQgaJpZM4J6zJv
.

@fede-green
Copy link

Hello!
Same problem here... and it would also be cool to have a way of forking existing themes and be able to then install the fork. Could you guide me there? ;)

thanks!

@oranja
Copy link
Contributor

oranja commented Oct 25, 2016

@lachenmayer: Any news?

@fredo-wunder: What you're asking is very doable. The basic steps are:

  1. Find the theme's repository URL:
    cat $OMF_PATH/db/themes/<name_of_the_theme>
    (replace <name_of_the_theme> with the name of the theme that you want to fork)
  2. Go to this URL in your browser and click on Fork in the upper right corner.
    Alternatively, you can just add /fork to the end of the address bar and press Enter.
    I recommend that you rename the repository (but keep the theme- prefix) so that you don't have conflicts.
  3. Now that you have a fork of the repository on your github account, you can clone it to your computer to work locally.
    git clone https://github.com/fredo-wunder/<name_of_the_theme>
  4. Make changes, add files, commit, push. Do your magic. 🌟
  5. Install your theme with omf install https://github.com/fredo-wunder/<name_of_the_theme>.

If you make additional changes to your theme, you can simply update OMF (omf update / omf u). You can also selectively update just your theme with omf u <name_of_the_theme>.

If you have more questions, feel free to ask.

@sagebind
Copy link
Member

sagebind commented Jan 6, 2017

The questions seem to be answered. omf install is currently designed for installing packages in the database, not package directories around the filesystem.

@sagebind sagebind closed this as completed Jan 6, 2017
@jdob
Copy link

jdob commented Jul 13, 2017

I'm not sure I'd personally consider this closed, since the instructions given by omf itself are misleading. I created a new theme following what's in README.md and see the same as the original poster:

~/.c/omf omf new theme jdob 15:06:23
create fish_greeting.fish
create fish_prompt.fish
create fish_right_prompt.fish
create fish_title.fish
create LICENSE
create README.md
Switched to /Users/jdob/.config/omf/themes/jdob
Theme not installed!
Install it using omf install jdob

omf is telling me to use "omf install" to install the theme, but when I try that, I see this issue.

⋊> ~/.c/o/t/jdob omf install jdob 15:06:48
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package jdob
fatal: repository 'jdob' does not exist
Could not install jdob.

@sagebind
Copy link
Member

sagebind commented Jul 13, 2017

@jdob The instructions are not designed to be misleading, but there is a bug in the code. I thought we fixed that at some point, but it seems I was just imagining it. The problem is that omf new theme <whatever> tries to set the theme after, which cannot be done. See #375 (comment)

This issue is closed because the problem you are describing is a different issue.

@sagebind
Copy link
Member

@jdob I created a new issue specifically for the problem you see. #529

@jdob
Copy link

jdob commented Jul 13, 2017

Ahh, ok, my bad. I thought the resolution was that it wasn't a bug. Thanks for the clarification :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants