From f657107dd489587e8ebd16ac114d9c4a32933141 Mon Sep 17 00:00:00 2001 From: Joey Lomanto Date: Thu, 29 Mar 2012 11:44:11 -0700 Subject: [PATCH 1/5] Adding personal theme with lightning bolts. --- themes/joeylomanto.zsh-theme | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 themes/joeylomanto.zsh-theme diff --git a/themes/joeylomanto.zsh-theme b/themes/joeylomanto.zsh-theme new file mode 100644 index 000000000..e5d0bc106 --- /dev/null +++ b/themes/joeylomanto.zsh-theme @@ -0,0 +1,7 @@ +PROMPT=$'%{$fg_bold[green]%}%n@macbookpro %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ +%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" +ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" From 04d7bda8fbfe82cc6f40090b83d1f3a500c4bb84 Mon Sep 17 00:00:00 2001 From: Joey Lomanto Date: Thu, 29 Mar 2012 16:00:24 -0700 Subject: [PATCH 2/5] Adding pretty log to git plugin (gplg). --- plugins/git/git.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index e1d682508..864b8f666 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -30,6 +30,8 @@ alias glg='git log --stat --max-count=5' compdef _git glg=git-log alias glgg='git log --graph --max-count=5' compdef _git glgg=git-log +alias gplg="git log --no-merges --graph --pretty=format:'%Cred%h%Creset - %C(green)%aN%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" +compdef _git gplg=git-log alias gss='git status -s' compdef _git gss=git-status alias ga='git add' From ba15b4e6737463ed9ed3647b5be298fcaba9e6d1 Mon Sep 17 00:00:00 2001 From: Joey Lomanto Date: Fri, 30 Mar 2012 11:08:45 -0700 Subject: [PATCH 3/5] Updating colours for git plugin. --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 864b8f666..062dc3c4e 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -30,7 +30,7 @@ alias glg='git log --stat --max-count=5' compdef _git glg=git-log alias glgg='git log --graph --max-count=5' compdef _git glgg=git-log -alias gplg="git log --no-merges --graph --pretty=format:'%Cred%h%Creset - %C(green)%aN%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" +alias gplg="git log --no-merges --graph --pretty=format:'%C()%h%Creset - %C(green)%aN%Creset -%C(blue)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" compdef _git gplg=git-log alias gss='git status -s' compdef _git gss=git-status From 06eb16e90e5e3811e1f50629fa9f6f7cfc2226ef Mon Sep 17 00:00:00 2001 From: Joey Lomanto Date: Mon, 16 Apr 2012 09:43:47 -0700 Subject: [PATCH 4/5] Making prompt smaller --- themes/joeylomanto.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/joeylomanto.zsh-theme b/themes/joeylomanto.zsh-theme index e5d0bc106..f51543326 100644 --- a/themes/joeylomanto.zsh-theme +++ b/themes/joeylomanto.zsh-theme @@ -1,4 +1,4 @@ -PROMPT=$'%{$fg_bold[green]%}%n@macbookpro %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ +PROMPT=$'%{$fg_bold[green]%}%n%} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ %{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" From fa51126325fc2dd84b4aa2e6ac94463b3a75114e Mon Sep 17 00:00:00 2001 From: Joey Lomanto Date: Mon, 16 Sep 2013 10:42:16 -0700 Subject: [PATCH 5/5] Yup. --- plugins/jump/jump.plugin.zsh | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 plugins/jump/jump.plugin.zsh diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh new file mode 100644 index 000000000..a3c5cf8c3 --- /dev/null +++ b/plugins/jump/jump.plugin.zsh @@ -0,0 +1,52 @@ +# Easily jump around the file system by manually adding marks +# marks are stored as symbolic links in the directory $MARKPATH (default $HOME/.marks) +# +# jump FOO: jump to a mark named FOO +# mark FOO: create a mark named FOO +# unmark FOO: delete a mark +# marks: lists all marks +# +export MARKPATH=$HOME/.marks + +jump() { + cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" +} + +mark() { + if (( $# == 0 )); then + MARK=$(basename "$(pwd)") + else + MARK="$1" + fi + if read -q \?"Mark $(pwd) as ${MARK}? (y/n) "; then + mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$MARK" + fi +} + +unmark() { + rm -i "$MARKPATH/$1" +} + +autoload colors +marks() { + for link in $MARKPATH/*(@); do + local markname="$fg[cyan]${link:t}$reset_color" + local markpath="$fg[blue]$(readlink $link)$reset_color" + printf "%s\t" $markname + printf "-> %s \t\n" $markpath + done +} + +_completemarks() { + reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g')) +} +compctl -K _completemarks jump +compctl -K _completemarks unmark + +_mark_expansion() { + setopt extendedglob + autoload -U modify-current-argument + modify-current-argument '$(readlink "$MARKPATH/$ARG")' +} +zle -N _mark_expansion +bindkey "^g" _mark_expansion