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

conf.yml not found #6

Closed
binyamin opened this issue Feb 19, 2020 · 10 comments
Closed

conf.yml not found #6

binyamin opened this issue Feb 19, 2020 · 10 comments

Comments

@binyamin
Copy link

I installed cheat via snap, but cheat wouldn't recognize a conf.yml in any directory except /snap, which seems to be read-only. The directories I tried include ~/.config/cheat/conf.yml, /etc/cheat/conf.yml, and ~/snap/cheat/1558/.cheat/conf.yml. I ended up downloading the executable.

@binyamin
Copy link
Author

Also, snap has its own options for configuration (https://snapcraft.io/docs/configuration-in-snaps)

@bernermic
Copy link
Collaborator

@b3u thanks for reporting and you are right. At the moment it is not possible to create your own conf.yml. It uses a predefined one here: /snap/cheat/current/etc/cheat/conf.yml.
But this one is indeed readonly.

I installed cheat via snap, but cheat wouldn't recognize a conf.yml in any directory except /snap, which seems to be read-only. The directories I tried include ~/.config/cheat/conf.yml, /etc/cheat/conf.yml, and ~/snap/cheat/1558/.cheat/conf.yml. I ended up downloading the executable.

Can you give me an idea what you want to achive via custom conf?

The snap version of cheat is updated with the community cheatsheets each version. Your personal cheatsheets go into the snap cheat directory.
At first start you can generate the personal cheat folder via cheat.cheatsheet-setup.
Then it should look like this:

$ cheat -d
community: /snap/cheat/1570/usr/share/cheat/cheatsheets/community
personal:  ~/snap/cheat/1570/.cheat

@binyamin
Copy link
Author

I would switch from vim to nano, and switch the personal path to my dropbox folder

@bernermic
Copy link
Collaborator

I would switch from vim to nano, and switch the personal path to my dropbox folder

The first one you could achive by specifying EDITOR or VISUAL as environment variable for example in.bashrc

I will have a look regarding the path.
I assume it is in your home Directory?
Can you give me an example path pls how the path looks for you?

@binyamin
Copy link
Author

Yes, it is in my home directory (~/Dropbox/)

@bernermic
Copy link
Collaborator

Ok, thanks for the info. That‘s good. Due to the snap confinement it is not possible to access „.“ folders but this should be doable.

I will make the config more flexible then.

@bernermic
Copy link
Collaborator

@b3u please update cheat to the edge channel. For this just run snap refresh cheat --edge

This is a first draft where you can use a custom config. I created an example config which should you guide to your needed config: https://gist.github.com/bernermic/04c94708199cf0eed68df318692d4ada. Only the path to your Dropbox must be changed to match your Home dir ...
You should place the conf.yml here: ~/snap/cheat/current/.cheat/conf.yml.

I did not want to release this yet for all users, as I need to think about how I will not break the setup for all other users first.

I would be happy if you tell me when this works for you.

@binyamin
Copy link
Author

Thanks, it's working great! 🚀 I copied ~/.config/cheat/conf.yml directly to ~/snap/cheat/current/.cheat/conf.yml, and it worked exactly as I expected.
I guess the only thing left is to update the snap instructions to reflect the change in the placement of the config file.

@bernermic
Copy link
Collaborator

Glad to hear that and yes of course I will update the readme.
As soon I have found a good way for the default conf I will update all and give you a heads up for testing the final version.
Would be nice if you could test this as well then 😀

@bernermic
Copy link
Collaborator

@b3u can you please do me a favor and test the latest release with your setup?
I made a release to the stable channel yesterday.

For this run snap refresh cheat --stable

I close this issue now as solved. Feel free to reopen it if you face issues.

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

No branches or pull requests

2 participants