https://github.com/nrjpoddar/bash-settings
Repository for bash settings
https://github.com/nrjpoddar/bash-settings
bash bash-settings
Last synced: about 1 month ago
JSON representation
Repository for bash settings
- Host: GitHub
- URL: https://github.com/nrjpoddar/bash-settings
- Owner: nrjpoddar
- Created: 2017-09-05T20:15:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2026-04-16T07:37:57.000Z (2 months ago)
- Last Synced: 2026-04-16T09:32:43.079Z (2 months ago)
- Topics: bash, bash-settings
- Language: Shell
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository contains common bash settings useful in developer workflow.
## Usage
Clone this repository and create following symlinks. (This assumes repository was
cloned under `$HOME`)
```bash
ln -s $HOME/bash-settings/.bash_aliases $HOME/.bash_aliases
ln -s $HOME/bash-settings/.profile $HOME/.profile
ln -s $HOME/bash-settings/.bashrc $HOME/.bashrc
ln -s $HOME/bash-settings/.bash_profile $HOME/.bash_profile
```
### Setting up bash-completion & Git prompt in Mac OSX
You need additional setup for getting the prompt working correctly in
Mac OSX:
* Install brew:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
* Post brew install add brew to your $PATH for bash as the instructions will default to zsh:
```bash
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"
```
* Install bash-completion
```bash
brew install bash-completion
```
* Install Git from brew
```bash
brew install git
```
* Close and restart the terminal, your prompt will include the Git branch if the
current directory is a Git workspace.
### Making bash your default shell
In newer versions of MAC OS, zsh is the default shell instead of bash. You can
use the following commands to switch to the latest version of bash as your
default login shell.
1. Install latest bash:
```bash
brew install bash
```
1. Add newly bash to list of shells. Note that the MAC OS default bash is quite old.
```bash
echo /opt/homebrew/bin/bash | sudo tee -a /etc/shells
```
1. Switch to bash as default login
```bash
chsh -s /opt/homebrew/bin/bash
```
### Setting up direnv in Mac OSX
Install direnv using brew:
```bash
brew install direnv
```
Your prompt will include the environment which is currently being used by
direnv.
### Setting up SSH keys for Github/Gitlab
```bash
ssh-keygen -t ed25519 -C "your_email@example.com"
```
Add the key to SSH agent in ~/.bash_profile
```bash
if [ -f $HOME/.ssh/ ] &&
! ssh-add -l | grep -q $HOME/.ssh/; then
ssh-add $HOME/.ssh/
fi
```