]> us-delaporte.pagekite.me Git - dotfiles.git/blob - zshrc
Track my own snippets too.
[dotfiles.git] / zshrc
1 # Collaboration permissions are nice.
2 umask 022
3
4 # Colors are nice.
5 # -----------------------------------------------------------------------
6 # autoload -U colors && colors
7 # autoload -U compinit && compinit
8
9 # setopt prompt_subst
10
11 alias vim='/Applications/MacVim.app/Contents/MacOS/Vim'
12 export EDITOR="vim"
13
14
15 ## Include local bin stuff on the path, if they are there.
16 #if [ -d $HOME/bin ]; then
17 # PATH=$PATH:$HOME/bin
18 #fi
19 #
20 ## Set screen title when SSH-ing
21 #ssh() {
22 # args=$@
23 # echo -ne "\033k${args##* }\033\\";
24 # env ssh "$@";
25 # # Set window title back here!
26 #}
27 #
28 ## Many thanks to https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/completion.zsh
29 ## Same guy who wrote antigen! Awesome!
30 #
31 ## disable named-directories autocompletion
32 #zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
33 #cdpath=(.)
34 #
35 ## SSH Completion should include ~/.ssh/config
36 #[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _global_ssh_hosts=()
37 #[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=()
38 #[ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=()
39 #[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=()
40 #hosts=(
41 # "$_ssh_config[@]"
42 # "$_global_ssh_hosts[@]"
43 # "$_ssh_hosts[@]"
44 # "$_etc_hosts[@]"
45 # "$HOST"
46 # localhost
47 #)
48 #zstyle ':completion:*:hosts' hosts $hosts
49 #zstyle ':completion:*' users off
50 #
51 ## Use caching so that commands like apt and dpkg complete are useable
52 #zstyle ':completion::complete:*' use-cache 1
53 #zstyle ':completion::complete:*' cache-path $ZSH/cache/
54 #
55 ## Don't complete uninteresting users
56 #zstyle ':completion:*:*:*:users' ignored-patterns \
57 # adm amanda apache avahi beaglidx bin cacti canna clamav daemon \
58 # dbus distcache dovecot fax ftp games gdm gkrellmd gopher \
59 # hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \
60 # mailman mailnull mldonkey mysql nagios \
61 # named netdump news nfsnobody nobody nscd ntp nut nx openvpn \
62 # operator pcap postfix postgres privoxy pulse pvm quagga radvd \
63 # rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs
64 #
65 #source ~/.vim/bundle/minion/add_to_your_profile
66 #source ~/.vim/bundle/minion/aliases_for_minion
67 #
68 #if [ -f ~/.krb5.conf ]; then
69 ## For Exchange Perl connector.
70 # export KRB5_CONFIG=$HOME/.krb5.conf
71 #fi
72 #
73 #if [ -f ~/dotfiles/prompt.py ]; then
74 # precmd() {
75 # PROMPT=`/usr/bin/python ~/dotfiles/prompt.py ~/dotfiles/prompt.txt`
76 # }
77 #fi
78 #
79 #if [ -f /usr/bin/xscreensaver ]; then
80 # alias lock="xscreensaver -l"
81 #fi
82 #
83 #if [ -f ~/dotfiles/scripts/add_to_your_profile ]; then
84 # source ~/dotfiles/scripts/add_to_your_profile
85 #fi
86 #
87 #if [ -f ~/.vim/bundle/vim-todo/bin ]; then
88 # source ~/.vim/bundle/vim-todo/bin
89 #fi
90 #
91 #
92 #alias gitlog git log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
93
94 alias vi vim
95
96 function ssh-copy-id {
97 cat ~/.ssh/id_rsa.pub | ssh $1 "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys; chmod 700 ~/.ssh && chmod 600 ~/.ssh/*"
98 # cat ~/.ssh/id_rsa.pub | ssh $1 "cat >> ~/id_rsa.pub"
99 }
100
101 export PATH=$PATH:$HOME/bin
102
103 # Task Aliases
104 # --------------
105 # Printout tasks
106 alias daily="task end.after:-1wk completed +daily &> /tmp/daily.txt;task +daily list &>> /tmp/daily.txt;open /tmp/daily.txt"
107 alias status="task list &> /tmp/status.txt; open /tmp/status.txt"
108 alias todo="task rc:~/dotfiles/taskrc_weekend $@"
109 alias team="task rc:~/dotfiles/taskrc_team $@"
110 alias someday="task rc:~/dotfiles/taskrc_someday $@"
111 alias vitc="vit -ms -someday -q -daily -assigned"
112 alias vitt="vit +daily"
113 alias vitf="vit +followup"
114 alias week_report="task completed"
115
116 # Minion aliases
117 # --------------
118 alias journal="minion --config=~/.minion_weekend $@"
119 alias life="minion --config=~/.minion_weekend $@"
120 alias mingoogle_drive="minion --config=/Users/delaport/dotfiles/minion_googledrive $@"
121
122 # alias journal="minion --config=~/.minion_weekend"
123 # TODO: Figure out how to make a Minion antigen bundle...
124 alias life="minion --config=~/.minion_weekend"
125
126 # For antigen
127 # ----------------
128 source ~/dotfiles/antigen/antigen.zsh
129
130 # Load the oh-my-zsh's library.
131 # Most others expect this one.
132 antigen use oh-my-zsh
133
134 # Nice git highlighting
135 antigen bundle git
136
137 # Autocomplete for pip install
138 antigen bundle pip
139
140 # Change command color if it exists.
141 antigen bundle command-not-found
142
143 # Color current command based on Zshell interpretation
144 antigen bundle zsh-users/zsh-syntax-highlighting
145
146 # Nice multiline git-aware prompt.
147 # antigen bundle sindresorhus/pure
148 # Does not play nicely with Git two-factor auth / SSH key auth
149
150 # Automatically activate virtualenvs
151 antigen bundle sharat87/autoenv
152
153 # Git Aware Prompt
154 antigen bundle nojhan/liquidprompt
155
156 # # Tell antigen that you're done.
157 antigen apply