joe
joe copied to clipboard
Consider adding custom gitignore files too
Maybe platform specific?
Mac needs to have .DS_Store for example. Some cloud platforms have their own files that need to be ignored. Editors have some (like #3).
How should be structure this?
I'm thinking this:
joe/
---- data/
-------- gitignore/ # submodule from github/gitignore
-------- custom/ # our own custom files
Seems good? Anyone have a good list of such files we can add?
#10 Doesn't organize the directory. Will rearrange that momentarily. I would appreciate any feedback on the new code to handle fetching the .gitignore file.
Looking at the PRs for github/gitignore, it looks quite active as well as has a high quality barrier. It may be best to let them have to deal with vetting *.gitignore files as they require proof in the PR.
I think it would be easier to remove the current submodule and re-add it with the new directory path as opposed to moving the current submodule.
Yup that sounds like a good plan. Let's do that after #10 is merged.
Left some notes on the PR.
The directory structure looks good.
Perhaps two new commands should be added - add and remove.
joe add <name> (<path> | [TEXT...])
joe remove <name>
These will copy and subsequently remove a .gitignore file.
Name cannot exist already in the data/ folder and you can only remove custom gitignore's. <path> is the path to the a .gitignore file. Perhaps alternatively a user could just list off what they want ignored and do not have to create an intermediate file.
I like that idea. I'm worried about custom data and updates. If we use the now-used data/ folder, then any time the user updates joe, all data will be wiped. We might need to add platform-specific code for this.
Linux data goes in /usr/share, Win in \ProgramData, Mac OS X in /Library/Application Support.
How about a folder just for custom data. When you run joe something it looks in the custom folder first. If not found, look in the defaults ignores and fails otherwise. This way we could "overwrite" the default definitions and nothing would be affected during updates...
@filipekiss I think the issue is when updating via a package manager this folder would be overridden. As a result, it would need to be stored anywhere but joe/ as it would be deleted upon update.
I may be wrong, though.
@munrocape I'm not sure about Windows, but for Linux and OS X maybe create a $HOME/.joe folder where custom data and settings would be stored. This way package managers would not override stuff when updating Joe itself.
That's what @karan listed - the customary/predictable locations for each OS where data like this can be stored.
I'll publish a branch later tonight regarding this if you want to check it out.
Sent from my iPhone
On Jan 20, 2015, at 4:00 PM, Filipe [email protected] wrote:
@munrocape I'm not sure about Windows, but for Linux and OS X maybe create a $HOME/.joe folder where custom data and settings would be stored. This way package managers would not override stuff when updating Joe itself.
— Reply to this email directly or view it on GitHub.
Great! I'll take a look, for sure. :D
— Enviado de um iCoiso
On Tue, Jan 20, 2015 at 6:10 PM, Zach Munro-Cape [email protected] wrote:
That's what @karan listed - the customary/predictable locations for each OS where data like this can be stored. I'll publish a branch later tonight regarding this if you want to check it out. Sent from my iPhone
On Jan 20, 2015, at 4:00 PM, Filipe [email protected] wrote:
@munrocape I'm not sure about Windows, but for Linux and OS X maybe create a $HOME/.joe folder where custom data and settings would be stored. This way package managers would not override stuff when updating Joe itself.
— Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub: https://github.com/karan/joe/issues/9#issuecomment-70723637
Seems like @filipekiss worked on it. Will wait for a PR.
Yeah, @filipekiss saw it through to completion :shipit:
Sent from my iPhone
On Jan 22, 2015, at 12:03 PM, Karan Goel [email protected] wrote:
Seems like @filipekiss worked on it. Will wait for a PR.
— Reply to this email directly or view it on GitHub.
New idea.
We move all files to a platform-specific folder: something like ~/.share/joe or something like that. We can have the gitignore repo there, and custom files.
What do you think about ~/.joe/data/default and ~/.joe/data/custom to store the data we'll be using and, if we ever need, we can also add ~/.joe/settings there. This way will keep everything related to joe namespaced and won't risk messing some other app files.