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