Heavily stripped version of Mathias’s dotfiles.
I chose to leave every possible file in a subfolder to keep my home dir as clean as possible and keep my own custom files separate from the other files.
I've made a copy of this repsitory that uses Oh My Zsh for two reasons.
- Mac is using Z shell as the deafult as off macOS Catalina.
- Oh My Zsh has many awesome features.
I will not update this repository as long as I'm happy using the other one. Here you can find my new repository: https://github.com/MGHollander/zsh-dotfiles
- Installation
- Keyboard shortcuts
- Aliases
- EditorConfig
- Add custom commands without creating a new fork
- Using two Git identities to seperate work and personal accounts
- Terminal completion
- Help
- Contact
- To do
Run git clone git@github.com:MGHollander/bash-dotfiles.git dotfiles
in the root of your user directory.
Add to ~/.bashrc
or ~/.bash_profile
:
# Load custom dotfiles
source ~/dotfiles/.bashrc;
NOTE: On Mac you have to change the default background en font color of the terminal.
Add to ~/.gitconfig
# Load custom git config
[include]
path = ~/dotfiles/.gitconfig
NOTE: Some git config files might be overwritten by Git GUI tools. For example: My ~/dotfiles/.gitignore
wasn't loading. When I checked my ~/.gitconfig
the excludesfile
variable was overwritten by Sourcetree. Therefore I have to configure my own global .gitignore in the Sourcetree settings.
My favorite keyboard shortcuts
If you want to use the .editorconfig
then you have to move it to the root of the user directory.
If ~/dotfiles/.extra
exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository.
Às of Git 2.13.0 there is a possibility to include confitional config. This is usefull when you use your machine for both work and private.
An example of how I use it.
My ~/.gitconfig
:
[user]
name = Marc Hollander
email = my@personal.mail
[includeIf "gitdir:~/dev/work/"]
path = ~/.gitconfig-work
My ~/.gitconfig-work
:
[user]
name = Marc Hollander (Work)
email = my@work.mail
By default my commits will be in name of my personal account. When I commit something from a repository inside the ~/dev/work/
directory, then it will be in name of my work account.
Git completion is add to the dotfiles. You can add paths to the CDPATH
variable in .exports
for shortcuts when you use the cd
command.
Run chmod -X ~/.git-completion.bash
and restart your terminal. (source)
Please create an issue if you have any questions or suggestions.
- Add a list with all functionalies included in the dotfiles. Describe things that happen in files that do not have aliases or functions, but do have useful functionalities (.bash_prompt, .exports, etc.).
- Check if the original dotfiles contain an installer and (re)add this to my version. Also add new stuff such as bash-completion (via Homebrew) and drush. Maybe run
brew services list
to see what is installed via Homebrew. - Build a oneshoe command to replace the current aliases. The command should check the current location and change the dir to properly run the scripts.