Skip to content

MGHollander/bash-dotfiles

Repository files navigation

Marc's dotfiles

Heavily stripped version of Mathias’s dotfiles.

Screenshot of my shell prompt

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.

NOTE

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

Table of content

Installation

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.

Keyboard shortcuts

My favorite keyboard shortcuts

Aliases

All available aliases

EditorConfig

If you want to use the .editorconfig then you have to move it to the root of the user directory.

Add custom commands without creating a new fork

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.

Using two Git identities to seperate work and personal accounts

À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.

Terminal completion

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.

Help

Git Completion not working

Run chmod -X ~/.git-completion.bash and restart your terminal. (source)

Contact

Please create an issue if you have any questions or suggestions.

To do

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages