1
0
mirror of https://github.com/kremalicious/dotfiles.git synced 2024-11-21 17:27:13 +01:00

add inputrc and some bash 4 features

This commit is contained in:
Matthias Kretschmann 2014-09-01 10:59:24 +02:00
parent 2b96b086c1
commit 9f73413628
4 changed files with 25 additions and 13 deletions

View File

@ -12,10 +12,10 @@
# Load ~/.private, ~/.bash_prompt
# ----------------------------------------------------------------------
for file in ~/.{bash_prompt,aliases,private}; do
for file in ~/.{bash_prompt,aliases,private,inputrc}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file"
done
unset file
done;
unset file;
# ----------------------------------------------------------------------
# SHELL OPTIONS
@ -37,6 +37,13 @@ shopt -s nocaseglob
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
# Enable some Bash 4 features when possible:
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
# * Recursive globbing, e.g. `echo **/*.txt`
for option in autocd globstar; do
shopt -s "$option" 2> /dev/null;
done;
# Add tab completion for many Bash commands
if which brew > /dev/null && [ -f "$(brew --prefix)/etc/bash_completion" ]; then
source "$(brew --prefix)/etc/bash_completion";
@ -51,21 +58,21 @@ export ARCHFLAGS="-arch x86_64"
# PATH
# ----------------------------------------------------------------------
PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin";
# we want the various sbins on the path along with /usr/local/bin
PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
PATH="/usr/local/bin:$PATH"
# if these bins exist, then add them to the PATH
ANDROID_HOME="/usr/local/opt/android-sdk"
[ -d "$ANDROID_HOME" ] && PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools";
[ -d "$ANDROID_HOME" ] && PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
# add to beginning of PATH so that it always take precedence over /usr/bin
[ -d "/usr/local/bin" ] && PATH="/usr/local/bin:$PATH";
[ -d "/usr/local/mysql/bin" ] && PATH="/usr/local/mysql/bin:$PATH";
[ -d "/usr/local/share/npm/bin" ] && PATH="/usr/local/share/npm/bin:$PATH";
[ -d "/usr/local/mysql/bin" ] && PATH="/usr/local/mysql/bin:$PATH"
[ -d "/usr/local/share/npm/bin" ] && PATH="/usr/local/share/npm/bin:$PATH"
[ -d "$HOME/.rvm/bin" ] && PATH="$HOME/.rvm/bin:$PATH"; # Add RVM to PATH for scripting
[ -d "$HOME/.rvm/bin" ] && PATH="$HOME/.rvm/bin:$PATH" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export PATH
export PATH;
# ----------------------------------------------------------------------
# LSCOLORS

5
inputrc Normal file
View File

@ -0,0 +1,5 @@
# Use case-insensitive TAB autocompletion
set completion-ignore-case on
# Auto list tab completions (use instead of TAB-cycling)
set show-all-if-ambiguous on

View File

@ -14,7 +14,7 @@
# dotfiles directory
dir=~/Projects/dotfiles
# list of files/folders to symlink in homedir
files="aliases bashrc bash_profile bash_prompt gemrc gitconfig gitignore_global hushlogin private tm_properties generator.json npmrc"
files="aliases bashrc bash_profile bash_prompt gemrc gitconfig gitignore_global hushlogin inputrc private tm_properties generator.json npmrc"
# ----------------------------------------------------------------------
# change to the dotfiles directory

View File

@ -14,7 +14,7 @@
# dotfiles directory
dir=~/Projects/dotfiles
# list of files/folders to symlink in homedir
files="aliases bashrc bash_profile bash_prompt gemrc gitconfig gitignore_global hushlogin private tm_properties generator.json npmrc"
files="aliases bashrc bash_profile bash_prompt gemrc gitconfig gitignore_global hushlogin inputrc private tm_properties generator.json npmrc"
# ----------------------------------------------------------------------
# change to the dotfiles directory