From bf2e9b53e4e7022111d4be00bf015e1799bf172d Mon Sep 17 00:00:00 2001 From: Edelwin Khaelos Date: Sat, 26 Apr 2014 19:46:35 +0200 Subject: [PATCH 1/4] added the functions gpull and gpush --- plugins/git/git.plugin.zsh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..c527c1006 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -119,6 +119,44 @@ function current_repository() { echo $(git remote -v | cut -d':' -f 2) } +# +# Massive listing of all the git repositories. +# You should run that from your coding repo, such as ~/code. +# + +gpull() +{ + find -type d -name ".git" > ~/repos.list + cd ~/ + for f in $( < repos.list); + do + cd $(dirname ${f}) + echo "[+] $(pwd) [+]" + git pull + cd ~/ + done + +} + +# +# This function takes the input from a file +# created by a command like $(find -type d -name ".git" > ~/myrepos) +# + +gpush() +{ + cd ~/ + [[ -f myrepos ]] || echo -e "warning, you seem to have forgotten to create your list.\n Please run (find -type d -name ".git" > ~/myrepos) and edit your file by hand to select your repos." + for f in $( < myrepos); + do + cd $(dirname ${f}) + echo "[+] $(pwd) [+]" + git push + cd ~/code/ + done +} + + # these aliases take advantage of the previous function alias ggpull='git pull origin $(current_branch)' compdef ggpull=git From 8d0c33110bb9e85247bfac3ce61ff8c24c5788d0 Mon Sep 17 00:00:00 2001 From: Edelwin Khaelos Date: Sat, 26 Apr 2014 19:49:27 +0200 Subject: [PATCH 2/4] fixed a random $ --- 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 c527c1006..b0d33c51d 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -146,7 +146,7 @@ gpull() gpush() { cd ~/ - [[ -f myrepos ]] || echo -e "warning, you seem to have forgotten to create your list.\n Please run (find -type d -name ".git" > ~/myrepos) and edit your file by hand to select your repos." + [[ -f myrepos ]] || echo -e "warning, you seem to have forgotten to create your list.\n Please run $(find -type d -name ".git" > ~/myrepos) and edit your file by hand to select your repos." for f in $( < myrepos); do cd $(dirname ${f}) From 4ee443577bd5faeadc9e4285807b57da32996bc5 Mon Sep 17 00:00:00 2001 From: Edelwin Khaelos Date: Sat, 26 Apr 2014 20:02:03 +0200 Subject: [PATCH 3/4] added my own prompt --- themes/edelprompt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 themes/edelprompt diff --git a/themes/edelprompt b/themes/edelprompt new file mode 100644 index 000000000..e7e8c833b --- /dev/null +++ b/themes/edelprompt @@ -0,0 +1,16 @@ +#### Modified Darkblood theme by Edelwin Khaelos #### + +dateprompt=$(date "+%d/%m/%Y %R") # Just change it if you don't like the format. +autoload -Uz promptinit +promptinit + + +PROMPT=$'%{$fg[red]%}┌[%B%b%{$reset_color%}%{$fg[blue]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}]$(git_prompt_info) +%{$fg[red]%}└[%{$fg[yellow]%}${dateprompt}%b%{$fg[red]%}]%{$reset_color%}%{$fg[red]%}─[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} ' + +PROMPT3="=>" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}──[%{$fg_bold[white]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[red]%}] " +ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}" + From 62177bf2b2bd2b08ccce7521c3ae8ace4aea3ea6 Mon Sep 17 00:00:00 2001 From: Edelwin Khaelos Date: Mon, 9 Jun 2014 20:57:49 +0200 Subject: [PATCH 4/4] reset 4ee443577bd5faeadc9e4285807b57da32996bc5 --- .oh-my-zsh | 1 + 1 file changed, 1 insertion(+) create mode 160000 .oh-my-zsh diff --git a/.oh-my-zsh b/.oh-my-zsh new file mode 160000 index 000000000..44017a3cf --- /dev/null +++ b/.oh-my-zsh @@ -0,0 +1 @@ +Subproject commit 44017a3cf0eede012b3bd7a85455aec23368ec86