Merge branch 'master' of github.com:scottwallacesh/dotfiles
This commit is contained in:
commit
b781c652ed
|
@ -20,6 +20,8 @@ _ssh() {
|
|||
fi
|
||||
}
|
||||
|
||||
complete -o bashdefault -o default -o nospace -F _ssh ssh 2>/dev/null \
|
||||
|| complete -o default -o nospace -F _ssh ssh
|
||||
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
|
||||
#--------------------------------------------------------------------------------
|
||||
|
|
28
.bashrc
28
.bashrc
|
@ -74,4 +74,32 @@ export GOPATH=${HOME}/src/go
|
|||
for FILE in ~/.bash/auto_complete.d/*; do source ${FILE}; done
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
# Run an SSH agent, if possible
|
||||
#--------------------------------------------------------------------------------
|
||||
SSH_ENV="$HOME/.ssh/environment"
|
||||
|
||||
function start_agent {
|
||||
echo -n "Initialising new SSH agent... "
|
||||
/usr/bin/ssh-agent 2> /dev/null | sed 's/^echo/#echo/' > "${SSH_ENV}"
|
||||
pgrep ssh-agent > /dev/null && echo "succeeded" || echo "failed"
|
||||
chmod 0600 "${SSH_ENV}"
|
||||
. "${SSH_ENV}" > /dev/null
|
||||
/usr/bin/ssh-add ~/.ssh/scott_dsa
|
||||
}
|
||||
|
||||
# Check if we already have an agent running and sourced
|
||||
if [ -z "${SSH_AUTH_SOCK}" ]; then
|
||||
# Source SSH settings, if applicable
|
||||
if [ -f "${SSH_ENV}" ]; then
|
||||
. "${SSH_ENV}" > /dev/null
|
||||
pgrep ssh-agent | grep -E "^${SSH_AGENT_PID}" > /dev/null || {
|
||||
start_agent
|
||||
}
|
||||
else
|
||||
start_agent
|
||||
fi
|
||||
fi
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
[ -f ~/.bashrc_local ] && source ~/.bashrc_local
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
|
||||
lg = !"git lg1"
|
||||
lgd = log -p --decorate
|
||||
history = log --oneline --abbrev-commit --all --graph --decorate
|
||||
history = log --pretty=oneline --abbrev-commit --all --graph --decorate
|
||||
tidy = remote prune origin
|
||||
st = status
|
||||
ci = commit
|
||||
|
|
Loading…
Reference in a new issue