GithubHelp home page GithubHelp logo

.bashrc.d's Introduction

My personal ~/.bashrc.d

If you are here, you use Bash and you like to have the same bash setup across all your machines/accounts.

So, in line with the Unix principle organising additional configuration files in a directory like /path/to/normal/config/file.d/, I started to do the same for my bash. Create a collection of additional scripts/files/snippets to execute at the launch of my bash session. This allows to personalize, tweak, colorize and what not.

When I created this repo on GitHub, I also discovered that many others have done similar things. This is in no way special, just my take on it.

Install

1. Add the following to your ~/.bashrc file

# Initialize `~/.bashrc.d`
[[ -s "${HOME}/.bashrc.d/.init.sh" ]] && source ${HOME}/.bashrc.d/.init.sh

2. Git clone this project as follows:

git clone https://github.com/detro/.bashrc.d.git ~/.bashrc.d

3. Start a new shell (i.e. bash session)

Using Terminal on macOS

By default, Terminal starts the shell via /usr/bin/login, which makes the shell a login shell. On every platform (not just Mac OS X) bash does not use .bashrc for login shells (only /etc/profile and the first of ~/.bash_profile, ~/.bash_login, ~/.profile that exists and is readable). So, make sure to alter step 1. based on your needs. Personally? I like ~/.bash_profile.

Personalization?

As much as one would love to write a set of Bash tweaks and functionalities, and have them work everywhere they work, there are still situations where you really need very specific things, in very circonscript contexts.

In other words, if there is a specific configuration that you want to keep local to a machine, just add the file to your local copy of .bashrc.d with the extension .private.sh. Git will ignore it but it will get loaded.

Special mention

One of the scripts I use for my prompt is posh-git-sh: thanks to David Xu for creating it.

License

None. Do with this as you see fit: unlicense.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.