Closed dimo414 closed 5 years ago
Original comment by Michael Diamond (Bitbucket: dimo414).
Thanks for reaching out! This is definitely something that could be documented better, and I’d like to create an install script to simplify this setup for people. Although initial setup is unfortunately a bit manual, once you have all the gems in place you can update everything at once with pgem_update
.
I would not suggest storing ProfileGem in your own dotfiles repo. Treat it as a library you install, rather than source code that you need to manage. Just clone it into your home directory and add source ~/ProfileGem/load.sh
to your .bashrc
.
Create a separate gem for all the aliases, functions, and other logic that go into your personal setup. This should be version controlled as a separate repo like the public gems (prompt.gem and util.gem) are. This should replace the need for any Bash files (.bashrc
, .bash_aliases
, etc.) in a dotfiles repo. Personally, I hardly ever touch my dotfiles repo though I’m tweaking stuff in my private .gem
s all the time.
stow
for managing your other dotfiles.You certainly can fork prompt.gem (as long as you're respecting the license), but I would suggest instead filing bugs and FRs against that project related to what you’re trying to do so it can be supported directly. It’s intended to be fairly modular and customizable already, so ideally you wouldn’t need to fork it to get the behavior you want.
Here’s what my setup looks like (with relevant version-control directories):
~
└── ProfileGem
├── .hg
├── load.sh
├── local.conf.sh
└── dimo414.gem # my private gem with personal customizations
| └── .hg
└── prompt.gem
| └── .hg
└── util.gem
└── .hg
On my work computer there's a separate employer.gem
directory that contains functionality specific to my work. Not only does this mean I can leave the work-specific features out of my personal setup, but even better I can share this gem with my coworkers without burdening them with my personal setup.
Hope that helps, let me know if you have more questions.
Original report by Kovas Palunas (Bitbucket: kovasap, GitHub: kovasap).
Hey this tool is great! I wanted to quickly ask about what the best way to organize and version control gems is. Currently, I have a modified prompt.gem, a untouched util.gem, and my own gem file in the ProfileGem directory in my home directory. I have added the whole ProfileGem directory to my own dotfiles mercurial repo, minus all the ProfileGem .hg repo files. I don’t think this is the best way to go about things, and wanted to ask for some advice. Is it possible to keep all my config (include the changes I made to prompt.gem) in my own .gem directory, and version control that only? Are there any files I need to version control in the main ProfileGem dir? Do you know of anyone else who stores their ProfileGem data in a dotfiles repository, and if so, how to they do it?