aboutsummaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2014-05-30 10:20:48 -0700
committershmibs <shmibs@gmail.com>2014-05-30 10:20:48 -0700
commit333b873ee6d27c6b42c2426f14591177bed08146 (patch)
tree3f64456489eacadec1ba98247ad3e6dde4d09311 /.zshrc
parent4ffad3ac6c5259b975650cf1aeaaecb1fd255be3 (diff)
downloaddotfiles-333b873ee6d27c6b42c2426f14591177bed08146.tar.gz
bash -> zsh
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc72
1 files changed, 72 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
new file mode 100644
index 0000000..6ecfdc6
--- /dev/null
+++ b/.zshrc
@@ -0,0 +1,72 @@
+zstyle ':completion:*' completer _complete _ignored
+zstyle :compinstall filename '/home/shmibs/.zshrc'
+setopt completealiases
+
+autoload -U compinit
+compinit
+autoload -U colors
+colors
+
+HISTFILE=~/.histfile
+HISTSIZE=1000
+SAVEHIST=1000
+setopt HIST_IGNORE_DUPS
+[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" history-beginning-search-backward
+[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward
+
+# urxvt does visual mode just fine, and i don't compose
+# any large strings in a shell, so treating it as always
+# insert mode is more sensible
+bindkey -e
+setopt notify
+unsetopt beep
+#%(?..%{$fg[red]%}[e]%{$fg[white]%})
+PROMPT="%{%B$fg[white]%}[%{%(!.$fg[red].$fg[magenta])%}%n@%M %{$fg[blue]%}%~%{$fg[white]%}]: %{%b$reset_color%}"
+
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+alias diff='colordiff'
+alias less='less -R'
+
+alias vmount='udevil mount'
+alias vumount='udevil umount'
+alias def='sdcv'
+
+export EDITOR="vim"
+export PAGER="less -R"
+
+################## FUNCTIONS ##################
+send() {
+ if [ "$1" ]; then
+ scp $@ shmibbles.me:/srv/http/tmp/
+ if [ $? -eq 0 ]; then
+ for name in "$@"
+ do
+ name=$(echo "http://shmibbles.me/tmp/$(basename $name)"\
+ | sed 's/ /%20/g')
+ echo $name | tr -d '\n' | xclip -i -selection clipboard
+ echo $name | tr -d '\n' | xclip -i -selection primary
+ done
+ fi
+ else
+ echo "specify at least one file to send"
+ fi
+}
+
+sendi() {
+ if [ "$1" ]; then
+ scp $@ shmibbles.me:/srv/http/img/
+ if [ $? -eq 0 ]; then
+ for name in "$@"
+ do
+ name=$(echo "http://shmibbles.me/img/$(basename $name)"\
+ | sed 's/ /%20/g')
+ echo $name | tr -d '\n' | xclip -i -selection clipboard
+ echo $name | tr -d '\n' | xclip -i -selection primary
+ done
+ fi
+ else
+ echo "specify at least one file to send"
+ fi
+}
+