mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Merge 62177bf2b2 into 3913106b2e
This commit is contained in:
commit
da5a399ca7
3 changed files with 55 additions and 0 deletions
1
.oh-my-zsh
Submodule
1
.oh-my-zsh
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 44017a3cf0eede012b3bd7a85455aec23368ec86
|
||||||
|
|
@ -119,6 +119,44 @@ function current_repository() {
|
||||||
echo $(git remote -v | cut -d':' -f 2)
|
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
|
# these aliases take advantage of the previous function
|
||||||
alias ggpull='git pull origin $(current_branch)'
|
alias ggpull='git pull origin $(current_branch)'
|
||||||
compdef ggpull=git
|
compdef ggpull=git
|
||||||
|
|
|
||||||
16
themes/edelprompt
Normal file
16
themes/edelprompt
Normal file
|
|
@ -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%}"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue