Created
December 2, 2015 13:53
-
-
Save krejac/f388a5a23aa9c597d2a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bash_profile | |
# Executed for login bash shells | |
# Add `~/bin` to the `$PATH` | |
export PATH="$HOME/bin:$PATH"; | |
# don't put duplicate lines or lines starting with space in the history. | |
# See bash(1) for more options | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
# Load the shell dotfiles, and then some: | |
# * ~/.path can be used to extend `$PATH`. | |
# * ~/.extra can be used for other settings you don’t want to commit. | |
for file in ~/.{bash_prompt,bash_aliases}; do | |
[ -r "$file" ] && [ -f "$file" ] && source "$file"; | |
done; | |
unset file; | |
# Enable bash completion | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards | |
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment