From 13e1363e1c453c758f3f21481cc694a02e105b1c Mon Sep 17 00:00:00 2001 From: Matt Parnell Date: Sat, 12 Nov 2011 21:09:27 -0800 Subject: [PATCH 1/3] add sprunge.us pastebin uploader - uses files, or pipes --- plugins/sprunge/sprunge.plugin.zsh | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 plugins/sprunge/sprunge.plugin.zsh diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh new file mode 100644 index 000000000..9f9432ac8 --- /dev/null +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -0,0 +1,64 @@ +# Contributed and SLIGHTLY modded by Matt Parnell/ilikenwf +# Created by the blogger at the URL below...I don't know where to find his/her name +# Original found at http://www.shellperson.net/sprunge-pastebin-script/ + +usage() { +description | fmt -s >&2 +} + +description() { +cat << HERE + +DESCRIPTION + Upload data and fetch URL from the pastebin http://sprunge.us + +USAGE + $0 filename.txt + $0 text string + $0 < filename.txt + piped_data | $0 + +NOTES +-------------------------------------------------------------------------- +* INPUT METHODS * +$0 can accept piped data, STDIN redirection [&2 + if [ "$*" ]; then + echo Arguments present... >&2 + if [ -f "$*" ]; then + echo Uploading the contents of "$*"... >&2 + cat "$*" + else + echo Uploading the text: \""$*"\"... >&2 + echo "$*" + fi | curl -F 'sprunge=<-' http://sprunge.us + else + echo No arguments found, printing USAGE and exiting. >&2 + usage + fi + else + echo Using input from a pipe or STDIN redirection... >&2 + while read -r line ; do + echo $line + done | curl -F 'sprunge=<-' http://sprunge.us + fi +} From 66109a491bf53a73c2b4008c8efa0e56673be6cd Mon Sep 17 00:00:00 2001 From: Matt Parnell Date: Sat, 12 Nov 2011 21:12:03 -0800 Subject: [PATCH 2/3] add my personal theme, based on the clean theme --- themes/mattparnell.zsh-theme | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 themes/mattparnell.zsh-theme diff --git a/themes/mattparnell.zsh-theme b/themes/mattparnell.zsh-theme new file mode 100644 index 000000000..ab574914e --- /dev/null +++ b/themes/mattparnell.zsh-theme @@ -0,0 +1,16 @@ +# based on clean.zsh-theme with some prompt tweaks + +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi + +PROMPT='%F{8}%n@%m%F{blue}%40<...< %~ %<<%F{white}%(!.#.%F{blue}$%F{8}) $(git_prompt_info)' +RPROMPT="[%D{%m/%d %I:%M %p}]" + +# git theming +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B" +ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗" + +# LS colors, made with http://geoff.greer.fm/lscolors/ +export LSCOLORS="Gxfxcxdxbxegedabagacad" +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' From 43dfb0c0fc2a99e36111090eb7003eeb0182d722 Mon Sep 17 00:00:00 2001 From: Matt Parnell Date: Wed, 16 Nov 2011 18:40:05 -0800 Subject: [PATCH 3/3] bleh --- lib/completion.zsh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b3cc91822..1c3512be0 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -31,17 +31,6 @@ zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories cdpath=(.) -# use /etc/hosts and known_hosts for hostname completion -[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=() -[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(