diff --git a/.bash/auto_complete.d/ssh b/.bash/auto_complete.d/ssh deleted file mode 100644 index 49bbbc2..0000000 --- a/.bash/auto_complete.d/ssh +++ /dev/null @@ -1,27 +0,0 @@ -#-------------------------------------------------------------------------------- -# Add bash completion for ssh: it tries to complete the host to which you -# want to connect from the list of the ones contained in ~/.ssh/known_hosts -#-------------------------------------------------------------------------------- -__ssh_known_hosts() { - if [[ -f ~/.ssh/known_hosts ]]; then - cut -d " " -f1 ~/.ssh/known_hosts | cut -d "," -f1 - fi -} - -_ssh() { - local cur known_hosts - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - known_hosts="$(__ssh_known_hosts)" - - if [[ ! ${cur} == -* ]] ; then - COMPREPLY=( $(compgen -W "${known_hosts}" -- ${cur}) ) - return 0 - fi -} - -for CMD in ssh scp telnet nc ftp ping curl; do - complete -o bashdefault -o default -o nospace -F _ssh ${CMD} 2>/dev/null \ - || complete -o default -o nospace -F _ssh ${CMD} -done -#-------------------------------------------------------------------------------- diff --git a/.bashrc b/.bashrc index 955b71b..9da39dc 100644 --- a/.bashrc +++ b/.bashrc @@ -67,8 +67,9 @@ fi #-------------------------------------------------------------------------------- # Add bash completion scripts #-------------------------------------------------------------------------------- -for FILE in /usr/local/etc/bash_completion.d/*; do source ${FILE}; done -for FILE in ~/.bash/auto_complete.d/*; do source ${FILE}; done +if [ -f $(brew --prefix)/etc/bash_completion ]; then + . $(brew --prefix)/etc/bash_completion +fi #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- diff --git a/bin/software-install.sh b/bin/software-install.sh index 72c939d..e398c7c 100755 --- a/bin/software-install.sh +++ b/bin/software-install.sh @@ -16,6 +16,7 @@ function install_linux_software { xargs sudo ${INSTALLCMD} <<-EOF ack + bash-completion git htop mosh @@ -38,6 +39,7 @@ function install_osx_software { #------------------------------- xargs brew install <<-EOF ack + bash-completion git coreutils htop-osx