Merge branch 'master' of github.com:hunner/hunners-homedir-configs
This commit is contained in:
commit
eb1823408a
8 changed files with 90 additions and 295 deletions
|
|
@ -49,7 +49,7 @@
|
||||||
(set-language-environment "UTF-8")
|
(set-language-environment "UTF-8")
|
||||||
(set-input-method "japanese-ascii") ; C-x C-m C-\
|
(set-input-method "japanese-ascii") ; C-x C-m C-\
|
||||||
(winner-mode t)
|
(winner-mode t)
|
||||||
(display-battery-mode t)
|
;;(display-battery-mode t) ;; broken on 10.9.2
|
||||||
(setq display-time-24hr-format t)
|
(setq display-time-24hr-format t)
|
||||||
(display-time-mode t)
|
(display-time-mode t)
|
||||||
(line-number-mode 1)
|
(line-number-mode 1)
|
||||||
|
|
@ -85,6 +85,26 @@
|
||||||
(indent-according-to-mode)))
|
(indent-according-to-mode)))
|
||||||
(global-set-key [C-tab] 'indent-according-to-mode)
|
(global-set-key [C-tab] 'indent-according-to-mode)
|
||||||
|
|
||||||
|
(autoload 'copy-from-above-command "misc"
|
||||||
|
"Copy characters from previous nonblank line, starting just above point.
|
||||||
|
|
||||||
|
\(fn &optional arg)"
|
||||||
|
'interactive)
|
||||||
|
(global-set-key [up] 'copy-from-above-command)
|
||||||
|
(global-set-key [down] (lambda ()
|
||||||
|
(interactive)
|
||||||
|
(forward-line 1)
|
||||||
|
(open-line 1)
|
||||||
|
(copy-from-above-command)))
|
||||||
|
(global-set-key [right] (lambda ()
|
||||||
|
(interactive)
|
||||||
|
(copy-from-above-command 1)))
|
||||||
|
(global-set-key [left] (lambda ()
|
||||||
|
(interactive)
|
||||||
|
(copy-from-above-command -1)
|
||||||
|
(forward-char -1)
|
||||||
|
(delete-char -1)))
|
||||||
|
|
||||||
;; Proxy for ssh tunnel + privoxy
|
;; Proxy for ssh tunnel + privoxy
|
||||||
;; (setq url-proxy-services '(("no_proxy" . "localhost")
|
;; (setq url-proxy-services '(("no_proxy" . "localhost")
|
||||||
;; ("http" . "localhost:8118")))
|
;; ("http" . "localhost:8118")))
|
||||||
|
|
@ -125,6 +145,11 @@
|
||||||
;; (setq default-directory saved-default-directory))
|
;; (setq default-directory saved-default-directory))
|
||||||
;; (global-set-key "\C-x\C-f" 'find-file-save-default-directory)
|
;; (global-set-key "\C-x\C-f" 'find-file-save-default-directory)
|
||||||
|
|
||||||
|
;; Enable mit-scheme
|
||||||
|
(setq scheme-program-name
|
||||||
|
"/opt/boxen/homebrew/bin/mit-scheme")
|
||||||
|
(require 'xscheme)
|
||||||
|
|
||||||
;; Give killing lines advice
|
;; Give killing lines advice
|
||||||
(defadvice kill-ring-save (before slick-copy activate compile)
|
(defadvice kill-ring-save (before slick-copy activate compile)
|
||||||
"When called interactively with no active region, copy a single line instead."
|
"When called interactively with no active region, copy a single line instead."
|
||||||
|
|
@ -208,18 +233,18 @@
|
||||||
("M-O" other-window)
|
("M-O" other-window)
|
||||||
("M-`" next-window)
|
("M-`" next-window)
|
||||||
("M-~" previous-window)
|
("M-~" previous-window)
|
||||||
("M-RET" ns-toggle-fullscreen)
|
("M-RET" toggle-fullscreen)
|
||||||
))
|
))
|
||||||
|
|
||||||
;;toggle full-screen
|
;;toggle full-screen
|
||||||
;; (defun toggle-fullscreen ()
|
(defun toggle-fullscreen ()
|
||||||
;; (interactive)
|
(interactive)
|
||||||
;; (set-frame-parameter
|
(set-frame-parameter
|
||||||
;; nil
|
nil
|
||||||
;; 'fullscreen
|
'fullscreen
|
||||||
;; (if (frame-parameter nil 'fullscreen)
|
(if (frame-parameter nil 'fullscreen)
|
||||||
;; nil
|
nil
|
||||||
;; 'fullboth)))
|
'fullboth)))
|
||||||
|
|
||||||
;; (global-set-key [(meta return)] 'toggle-fullscreen)
|
;; (global-set-key [(meta return)] 'toggle-fullscreen)
|
||||||
|
|
||||||
|
|
@ -351,15 +376,3 @@
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
'(mumamo-border-face-in ((t nil)))
|
'(mumamo-border-face-in ((t nil)))
|
||||||
'(mumamo-border-face-out ((t nil))))
|
'(mumamo-border-face-out ((t nil))))
|
||||||
|
|
||||||
|
|
||||||
;;; This was installed by package-install.el.
|
|
||||||
;;; This provides support for the package system and
|
|
||||||
;;; interfacing with ELPA, the package archive.
|
|
||||||
;;; Move this code earlier if you want to reference
|
|
||||||
;;; packages in your .emacs.
|
|
||||||
(when
|
|
||||||
(load
|
|
||||||
(expand-file-name "~/.emacs.d/elpa/package.el"))
|
|
||||||
(package-initialize)
|
|
||||||
(require 'starter-kit-elpa))
|
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,5 @@ helper = /opt/boxen/bin/boxen-git-credential
|
||||||
|
|
||||||
[hub]
|
[hub]
|
||||||
protocol = https
|
protocol = https
|
||||||
|
[gitreview]
|
||||||
|
username = hunner
|
||||||
|
|
|
||||||
1
.nvim
Symbolic link
1
.nvim
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
.vim
|
||||||
1
.nvimrc
Symbolic link
1
.nvimrc
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
.vimrc
|
||||||
|
|
@ -40,11 +40,12 @@ bind Down swap-pane -D
|
||||||
bind C-r source-file ~/.tmux.conf
|
bind C-r source-file ~/.tmux.conf
|
||||||
|
|
||||||
# Set default path
|
# Set default path
|
||||||
bind R set-option default-path "$PWD"
|
#bind R set-option default-path "$PWD" #removed in 1.9a
|
||||||
bind C set-option default-path ""
|
#bind C set-option default-path "" #removed in 1.9a
|
||||||
|
|
||||||
# Start window in the session root
|
# Start window in the session root
|
||||||
bind r new-window -c -
|
bind r new-window
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
|
||||||
# Moving between windows
|
# Moving between windows
|
||||||
#bind " " next-window
|
#bind " " next-window
|
||||||
|
|
@ -55,6 +56,8 @@ bind r new-window -c -
|
||||||
# splits
|
# splits
|
||||||
#unbind %
|
#unbind %
|
||||||
#unbind '"'
|
#unbind '"'
|
||||||
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
bind '"' split-window -v -c "#{pane_current_path}"
|
||||||
#bind | split-window -h
|
#bind | split-window -h
|
||||||
#bind - split-window -v
|
#bind - split-window -v
|
||||||
#bind = next-layout
|
#bind = next-layout
|
||||||
|
|
|
||||||
3
.vimrc
3
.vimrc
|
|
@ -944,6 +944,7 @@ if has("eval")
|
||||||
setlocal relativenumber
|
setlocal relativenumber
|
||||||
elseif &rnu
|
elseif &rnu
|
||||||
setlocal number
|
setlocal number
|
||||||
|
setlocal norelativenumber
|
||||||
elseif &nu
|
elseif &nu
|
||||||
setlocal nonumber
|
setlocal nonumber
|
||||||
endif
|
endif
|
||||||
|
|
@ -1168,7 +1169,7 @@ let g:ctrlp_switch_buffer = 1
|
||||||
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
|
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
|
||||||
|
|
||||||
" GuiTabLabel
|
" GuiTabLabel
|
||||||
function GuiTabLabel()
|
function! GuiTabLabel()
|
||||||
let label = ''
|
let label = ''
|
||||||
let bufnrlist = tabpagebuflist(v:lnum)
|
let bufnrlist = tabpagebuflist(v:lnum)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,246 +0,0 @@
|
||||||
##
|
|
||||||
## Load with `autoload -U zgitinit; zgitinit'
|
|
||||||
##
|
|
||||||
|
|
||||||
typeset -gA zgit_info
|
|
||||||
zgit_info=()
|
|
||||||
|
|
||||||
zgit_chpwd_hook() {
|
|
||||||
zgit_info_update
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_preexec_hook() {
|
|
||||||
if [[ $2 == git\ * ]] || [[ $2 == *\ git\ * ]]; then
|
|
||||||
zgit_precmd_do_update=1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_precmd_hook() {
|
|
||||||
if [ $zgit_precmd_do_update ]; then
|
|
||||||
unset zgit_precmd_do_update
|
|
||||||
zgit_info_update
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_info_update() {
|
|
||||||
zgit_info=()
|
|
||||||
|
|
||||||
local gitdir="$(git rev-parse --git-dir 2>/dev/null)"
|
|
||||||
if [ $? -ne 0 ] || [ -z "$gitdir" ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
zgit_info[dir]=$gitdir
|
|
||||||
zgit_info[bare]=$(git rev-parse --is-bare-repository)
|
|
||||||
zgit_info[inwork]=$(git rev-parse --is-inside-work-tree)
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_isgit() {
|
|
||||||
if [ -z "$zgit_info[dir]" ]; then
|
|
||||||
return 1
|
|
||||||
else
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_inworktree() {
|
|
||||||
zgit_isgit || return
|
|
||||||
if [ "$zgit_info[inwork]" = "true" ]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_isbare() {
|
|
||||||
zgit_isgit || return
|
|
||||||
if [ "$zgit_info[bare]" = "true" ]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_head() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
|
|
||||||
if [ -z "$zgit_info[head]" ]; then
|
|
||||||
local name=''
|
|
||||||
name=$(git symbolic-ref -q HEAD)
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
if [[ $name == refs/(heads|tags)/* ]]; then
|
|
||||||
name=${name#refs/(heads|tags)/}
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
name=$(git name-rev --name-only --no-undefined --always HEAD)
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
return 1
|
|
||||||
elif [[ $name == remotes/* ]]; then
|
|
||||||
name=${name#remotes/}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
zgit_info[head]=$name
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $zgit_info[head]
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_branch() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
zgit_isbare && return 1
|
|
||||||
|
|
||||||
if [ -z "$zgit_info[branch]" ]; then
|
|
||||||
local branch=$(git symbolic-ref HEAD 2>/dev/null)
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
branch=${branch##*/}
|
|
||||||
else
|
|
||||||
branch=$(git name-rev --name-only --always HEAD)
|
|
||||||
fi
|
|
||||||
zgit_info[branch]=$branch
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $zgit_info[branch]
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_tracking_remote() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
zgit_isbare && return 1
|
|
||||||
|
|
||||||
local branch
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
branch=$1
|
|
||||||
elif [ -z "$zgit_info[branch]" ]; then
|
|
||||||
branch=$(zgit_branch)
|
|
||||||
[ $? -ne 0 ] && return 1
|
|
||||||
else
|
|
||||||
branch=$zgit_info[branch]
|
|
||||||
fi
|
|
||||||
|
|
||||||
local k="tracking_$branch"
|
|
||||||
local remote
|
|
||||||
if [ -z "$zgit_info[$k]" ]; then
|
|
||||||
remote=$(git config branch.$branch.remote)
|
|
||||||
zgit_info[$k]=$remote
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $zgit_info[$k]
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_tracking_merge() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
zgit_isbare && return 1
|
|
||||||
|
|
||||||
local branch
|
|
||||||
if [ -z "$zgit_info[branch]" ]; then
|
|
||||||
branch=$(zgit_branch)
|
|
||||||
[ $? -ne 0 ] && return 1
|
|
||||||
else
|
|
||||||
branch=$zgit_info[branch]
|
|
||||||
fi
|
|
||||||
|
|
||||||
local remote=$(zgit_tracking_remote $branch)
|
|
||||||
[ $? -ne 0 ] && return 1
|
|
||||||
if [ -n "$remote" ]; then # tracking branch
|
|
||||||
local merge=$(git config branch.$branch.merge)
|
|
||||||
if [ $remote != "." ]; then
|
|
||||||
merge=$remote/$(basename $merge)
|
|
||||||
fi
|
|
||||||
echo $merge
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_isindexclean() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
if git diff --quiet --cached 2>/dev/null; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_isworktreeclean() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
if git diff --quiet 2>/dev/null; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_hasuntracked() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
local -a flist
|
|
||||||
flist=($(git ls-files --others --exclude-standard))
|
|
||||||
if [ $#flist -gt 0 ]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_hasunmerged() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
local -a flist
|
|
||||||
flist=($(git ls-files -u))
|
|
||||||
if [ $#flist -gt 0 ]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_svnhead() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
|
|
||||||
local commit=$1
|
|
||||||
if [ -z "$commit" ]; then
|
|
||||||
commit='HEAD'
|
|
||||||
fi
|
|
||||||
|
|
||||||
git show --raw $commit | \
|
|
||||||
grep git-svn-id | \
|
|
||||||
sed -re 's/^\s*git-svn-id: .*@([0-9]+).*$/\1/'
|
|
||||||
}
|
|
||||||
|
|
||||||
zgit_rebaseinfo() {
|
|
||||||
zgit_isgit || return 1
|
|
||||||
if [ -d $zgit_info[dir]/rebase-merge ]; then
|
|
||||||
dotest=$zgit_info[dir]/rebase-merge
|
|
||||||
elif [ -d $zgit_info[dir]/.dotest-merge ]; then
|
|
||||||
dotest=$zgit_info[dir]/.dotest-merge
|
|
||||||
elif [ -d .dotest ]; then
|
|
||||||
dotest=.dotest
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
zgit_info[dotest]=$dotest
|
|
||||||
|
|
||||||
zgit_info[rb_onto]=$(cat "$dotest/onto")
|
|
||||||
if [ -f "$dotest/upstream" ]; then
|
|
||||||
zgit_info[rb_upstream]=$(cat "$dotest/upstream")
|
|
||||||
else
|
|
||||||
zgit_info[rb_upstream]=
|
|
||||||
fi
|
|
||||||
if [ -f "$dotest/orig-head" ]; then
|
|
||||||
zgit_info[rb_head]=$(cat "$dotest/orig-head")
|
|
||||||
elif [ -f "$dotest/head" ]; then
|
|
||||||
zgit_info[rb_head]=$(cat "$dotest/head")
|
|
||||||
fi
|
|
||||||
zgit_info[rb_head_name]=$(cat "$dotest/head-name")
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
chpwd_functions+=zgit_chpwd_hook
|
|
||||||
preexec_functions+=zgit_preexec_hook
|
|
||||||
precmd_functions+=zgit_precmd_hook
|
|
||||||
|
|
||||||
zgit_info_update
|
|
||||||
|
|
||||||
# vim:set ft=zsh:
|
|
||||||
66
.zshenv
66
.zshenv
|
|
@ -11,15 +11,23 @@ fpath=($fpath $HOME/.zsh/func)
|
||||||
#typeset -u fpath
|
#typeset -u fpath
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
setopt appendhistory hist_ignore_space hist_ignore_all_dups extendedglob nomatch notify dvorak # correct
|
setopt prompt_subst appendhistory hist_ignore_space hist_ignore_all_dups extendedglob nomatch notify dvorak # correct
|
||||||
unsetopt beep
|
unsetopt beep
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
|
||||||
zstyle :compinstall filename '~/.zshrc'
|
zstyle ':completion:*' completer _complete
|
||||||
autoload -Uz compinit colors zgitinit && colors && zgitinit
|
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*'
|
||||||
|
autoload -Uz compinit colors vcs_info select-word-style && colors
|
||||||
compinit -u
|
compinit -u
|
||||||
|
|
||||||
|
zstyle :compinstall filename '~/.zshenv'
|
||||||
|
zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||||
|
zstyle ':vcs_info:*' formats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
|
||||||
|
zstyle ':vcs_info:*' enable git
|
||||||
|
|
||||||
#bindkey '^L' push-line
|
#bindkey '^L' push-line
|
||||||
bindkey "^I" expand-or-complete-prefix
|
bindkey "^I" expand-or-complete-prefix
|
||||||
|
#select-word-style bash
|
||||||
umask 022
|
umask 022
|
||||||
|
|
||||||
# Fix $TERM
|
# Fix $TERM
|
||||||
|
|
@ -97,23 +105,29 @@ export ENVPUPPET_BASEDIR="$HOME/Documents/work/git"
|
||||||
export OVFTOOL='/Applications/VMware OVF Tool/ovftool'
|
export OVFTOOL='/Applications/VMware OVF Tool/ovftool'
|
||||||
|
|
||||||
# Prompt
|
# Prompt
|
||||||
#PS1="%m%# "
|
#prompt_precmd() {
|
||||||
prompt_precmd() {
|
# gitcolor=""
|
||||||
gitcolor=""
|
# if zgit_isgit ; then
|
||||||
if zgit_isgit ; then
|
# if ! zgit_isindexclean ; then
|
||||||
if ! zgit_isindexclean ; then
|
# #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>"
|
||||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f](%F{cyan}$(zgit_branch)%f)>"
|
# gitcolor=$fg[blue]
|
||||||
gitcolor=$fg[blue]
|
# elif ! zgit_isworktreeclean ; then
|
||||||
elif ! zgit_isworktreeclean ; then
|
# #PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>"
|
||||||
#PROMPT="[%F{$usercolor}%n%F{white}@%F{$hostcolor}%m%F{white}:%F{blue}%~%f]>"
|
# gitcolor=$fg[green]
|
||||||
gitcolor=$fg[green]
|
# fi
|
||||||
fi
|
# fi
|
||||||
fi
|
# color="%(?.$gitcolor.$fg[red])"
|
||||||
color="%(?.$gitcolor.$fg[red])"
|
# PROMPT="%m$color%#%{$reset_color%} "
|
||||||
PROMPT="%m$color%#%{$reset_color%} "
|
#}
|
||||||
}
|
|
||||||
#precmd_functions+=prompt_precmd
|
#precmd_functions+=prompt_precmd
|
||||||
PROMPT="%m%# "
|
PROMPT="%m%# "
|
||||||
|
vcs_info_wrapper() {
|
||||||
|
vcs_info
|
||||||
|
if [ -n "$vcs_info_msg_0_" ]; then
|
||||||
|
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
RPROMPT=$'$(vcs_info_wrapper)'
|
||||||
|
|
||||||
if [ `uname -s` = "SunOS" ] ; then
|
if [ `uname -s` = "SunOS" ] ; then
|
||||||
export LANG="C"
|
export LANG="C"
|
||||||
|
|
@ -167,10 +181,12 @@ alias vd=${VIM}diff
|
||||||
alias vir=vr
|
alias vir=vr
|
||||||
alias vis=vs
|
alias vis=vs
|
||||||
alias gvim="gvim -font 'APL385 Unicode 8' -c 'set keymap=uniapl385'"
|
alias gvim="gvim -font 'APL385 Unicode 8' -c 'set keymap=uniapl385'"
|
||||||
|
alias n=nvim
|
||||||
|
|
||||||
## For forwarding ssh auth I think
|
## For forwarding ssh auth I think
|
||||||
if [ -n "$SSH_AUTH_SOCK" ] ; then
|
if [ ! -z "$SSH_AUTH_SOCK" -a "$SSH_AUTH_SOCK" != "$HOME/.ssh-agent" ] ; then
|
||||||
ln -fs $SSH_AUTH_SOCK $HOME/.ssh-agent
|
ln -fs $SSH_AUTH_SOCK "$HOME/.ssh-agent"
|
||||||
|
export SSH_AUTH_SOCK="$HOME/.ssh-agent"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Add extra fonts
|
## Add extra fonts
|
||||||
|
|
@ -245,14 +261,14 @@ alias gd="git diff"
|
||||||
alias gdc="git diff --cached"
|
alias gdc="git diff --cached"
|
||||||
alias gc="git commit"
|
alias gc="git commit"
|
||||||
alias gca="git commit --amend"
|
alias gca="git commit --amend"
|
||||||
alias gfa="git fetch --all"
|
alias gfa="git fetch --all --prune"
|
||||||
alias gfap="git fetch --all --prune"
|
|
||||||
alias gr="git remote -v show"
|
alias gr="git remote -v show"
|
||||||
alias gp="git push"
|
alias gp="git push"
|
||||||
alias gu="git pull"
|
alias gu="git pull"
|
||||||
alias gdw="git diff --color-words"
|
alias gdw="git diff --color-words"
|
||||||
alias gk="gitk --all&"
|
alias gk="gitk --all&"
|
||||||
alias gx="gitx --all"
|
alias gx="gitx --all"
|
||||||
|
alias be="bundle exec"
|
||||||
alias uzbl="uzbl-browser"
|
alias uzbl="uzbl-browser"
|
||||||
alias hide="SetFile -a V"
|
alias hide="SetFile -a V"
|
||||||
alias show="SetFile -a v"
|
alias show="SetFile -a v"
|
||||||
|
|
@ -265,6 +281,10 @@ alias -s mkv="mplayer"
|
||||||
alias -s mpg="mplayer"
|
alias -s mpg="mplayer"
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
|
function listvm() { curl -s --url http://vcloud.delivery.puppetlabs.net/vm/ ; }
|
||||||
|
function getvm() { curl -d --url http://vcloud.delivery.puppetlabs.net/vm/$1 ; }
|
||||||
|
function sshvm() { ssh -i ~/.ssh/id_rsa-acceptance root@$1 ; }
|
||||||
|
function rmvm() { curl -X DELETE --url http://vcloud.delivery.puppetlabs.net/vm/$1 ; }
|
||||||
args() { echo $#; }
|
args() { echo $#; }
|
||||||
title() { WINTITLE="$*"; print -Pn "\e]0;$WINTITLE\a" }
|
title() { WINTITLE="$*"; print -Pn "\e]0;$WINTITLE\a" }
|
||||||
hl() { pbpaste | highlight --syntax=$1 -O rtf | pbcopy }
|
hl() { pbpaste | highlight --syntax=$1 -O rtf | pbcopy }
|
||||||
|
|
@ -336,7 +356,7 @@ zpush() {
|
||||||
}
|
}
|
||||||
function r() {
|
function r() {
|
||||||
if [[ -n $TMUX ]]; then
|
if [[ -n $TMUX ]]; then
|
||||||
NEW_SSH_AUTH_SOCK=`tmux showenv|grep ^SSH_AUTH_SOCK|cut -d = -f 2`
|
NEW_SSH_AUTH_SOCK=`tmux showenv|grep '^SSH_AUTH_SOCK'|cut -d = -f 2`
|
||||||
if [[ -n $NEW_SSH_AUTH_SOCK ]] && [[ -S $NEW_SSH_AUTH_SOCK ]]; then
|
if [[ -n $NEW_SSH_AUTH_SOCK ]] && [[ -S $NEW_SSH_AUTH_SOCK ]]; then
|
||||||
SSH_AUTH_SOCK=$NEW_SSH_AUTH_SOCK
|
SSH_AUTH_SOCK=$NEW_SSH_AUTH_SOCK
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue