Merge branch 'master' of github.com:/crh0831/dotfiles-zsh
This commit is contained in:
@@ -56,7 +56,8 @@ alias crawlrestore='rm -rf ~/.crawl && tar xvf ~/crawlsave.tgz -C ~/ && crawl-ti
|
||||
alias mempigs='ps aux | awk '\''{print $6/1024 " MB\t\t" $11 " " $12}'\'' | sort -n | tail -10'
|
||||
|
||||
# Always get a proper output name from youtube-dl
|
||||
alias ytdl='youtube-dl -o "%(title)s.%(ext)s"'
|
||||
alias ytdl='youtube-dl -o "%(title)s.%(ext)s" '
|
||||
alias ytdlmp3='youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" '
|
||||
|
||||
# termbin shortcut
|
||||
alias tb='nc bin.planethawleywood.com 9999'
|
||||
|
||||
24
.zshrc
24
.zshrc
@@ -119,3 +119,27 @@ source $HOME/.zsh_functions
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
||||
|
||||
# initialize and load SSH-AGENT
|
||||
# https://stackoverflow.com/a/18915067
|
||||
SSH_ENV="$HOME/.ssh/environment"
|
||||
|
||||
function start_agent {
|
||||
echo "Initialising new SSH agent..."
|
||||
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
|
||||
echo succeeded
|
||||
chmod 600 "${SSH_ENV}"
|
||||
. "${SSH_ENV}" > /dev/null
|
||||
/usr/bin/ssh-add;
|
||||
}
|
||||
|
||||
# Source SSH settings, if applicable
|
||||
|
||||
if [ -f "${SSH_ENV}" ]; then
|
||||
. "${SSH_ENV}" > /dev/null
|
||||
#ps ${SSH_AGENT_PID} doesn't work under cywgin
|
||||
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
|
||||
start_agent;
|
||||
}
|
||||
else
|
||||
start_agent;
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user