From f03e60b30d85556d831a14ae895f761cf4553159 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Sat, 13 Jun 2015 18:14:06 -0700 Subject: [PATCH] Various dotfile updates. --- aliases | 4 ++-- vimrc | 2 ++ zshrc | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/aliases b/aliases index 5f6289b..753fb47 100644 --- a/aliases +++ b/aliases @@ -14,7 +14,7 @@ alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' # Easy upgrade -alias dist-upgrade="sudo sh -c 'apt-get update && apt-get dist-upgrade'" +alias dist-upgrade="sudo sh -c 'apt-get update && apt-get -y dist-upgrade'" # Timestamp in a machine-sortable form alias tstamp="date '+%Y%m%d-%H%M%S'" @@ -29,4 +29,4 @@ alias objdump="command objdump -M intel" alias ack="ack-grep" # Launch chrome for burp -alias chrome-for-burp="/usr/bin/google-chrome --ignore-certificate-errors --user-data-dir=~/.chrome-for-burp --proxy-server=127.0.0.1:8080" +alias chrome-for-burp="/usr/bin/google-chrome --ignore-certificate-errors --user-data-dir=${HOME}/.chrome-for-burp --proxy-server=127.0.0.1:8080 >/dev/null 2>&1 &" diff --git a/vimrc b/vimrc index 8d1bd03..7de8a61 100644 --- a/vimrc +++ b/vimrc @@ -14,6 +14,8 @@ if filereadable(glob("~/.vim/bundle/Vundle.vim/README.md")) Plugin 'scrooloose/syntastic' Plugin 'mattn/webapi-vim' Plugin 'mattn/gist-vim' + Plugin 'fatih/vim-go' + Plugin 'Valloric/YouCompleteMe' call vundle#end() endif diff --git a/zshrc b/zshrc index 362a536..051582b 100644 --- a/zshrc +++ b/zshrc @@ -44,5 +44,23 @@ bindkey '^[[B' history-search-forward bindkey '^[[1;5C' forward-word bindkey '^[[1;5D' backward-word +# SSH autocompletion +# ssh, scp, ping, host +# https://github.com/tehmaze/maze.io/blob/master/maze/_post/2008/08-03-remote-tabcompletion-using-openssh-and-zsh.md +zstyle ':completion:*:scp:*' tag-order 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' +zstyle ':completion:*:scp:*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr +zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *' +zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr +zstyle ':completion:*:(ssh|scp):*:hosts-host' ignored-patterns '*.*' loopback localhost +zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^*.*' '*@*' +zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' '127.0.0.<->' +zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns adm bin daemon halt lp named shutdown sync +zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=( + ${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \ + /dev/null)"}%%[# ]*}//,/ } + ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} + ${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}} + )' + # Load any local settings if [ -e $HOME/.zshrc.local ] ; then source $HOME/.zshrc.local ; fi