2014-06-25 16:10:23 +00:00
|
|
|
# If possible, add tab completion for many commands
|
|
|
|
[ -f /etc/bash_completion ] && source /etc/bash_completion
|
|
|
|
|
|
|
|
# Bash completion (installed via Homebrew; source after `brew` is added to PATH)
|
|
|
|
command -v brew >/dev/null 2>&1 && [ -r "$(brew --prefix)/etc/bash_completion" ] && source "$(brew --prefix)/etc/bash_completion"
|
|
|
|
|
|
|
|
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
|
|
|
function _ssh_reload_autocomplete() {
|
|
|
|
[ -e "~/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
|
|
|
|
}
|
|
|
|
_ssh_reload_autocomplete
|
|
|
|
|
|
|
|
# Add AWS CLI Completion.
|
|
|
|
complete -C aws_completer aws
|
2014-09-25 07:55:13 +00:00
|
|
|
complete -F _tmux t
|
|
|
|
|
|
|
|
# Add Gush completion.
|
|
|
|
[ -f $HOME/.gush/.gush-autocomplete.bash ] && source $HOME/.gush/.gush-autocomplete.bash
|