mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-19 02:02:32 +01:00
Merge git://github.com/sjl/oh-my-zsh into sjl
This commit is contained in:
commit
f0d9edcbb9
7 changed files with 57 additions and 6 deletions
|
|
@ -4,6 +4,9 @@ setopt auto_pushd
|
|||
setopt pushd_ignore_dups
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
alias .....='cd ../../../..'
|
||||
alias cd..='cd ..'
|
||||
alias cd...='cd ../..'
|
||||
alias cd....='cd ../../..'
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ function tab() {
|
|||
end
|
||||
tell application "Terminal"
|
||||
activate
|
||||
do script with command "cd \"$PWD\"; $*" in window 1
|
||||
do script with command "cd \"$PWD\"; clear; $*" in window 1
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
|
|
|||
16
lib/git.zsh
16
lib/git.zsh
|
|
@ -5,10 +5,18 @@ function git_prompt_info() {
|
|||
}
|
||||
|
||||
parse_git_dirty () {
|
||||
if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then
|
||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
else
|
||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
gitstat=$(git status 2>/dev/null | grep '\(# Untracked\|# Changes\|# Changed but not updated:\)')
|
||||
|
||||
if [[ $(echo ${gitstat} | grep -c "^# Changes to be committed:$") > 0 ]]; then
|
||||
echo -n "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||
fi
|
||||
|
||||
if [[ $(echo ${gitstat} | grep -c "^\(# Untracked files:\|# Changed but not updated:\)$") > 0 ]]; then
|
||||
echo -n "$ZSH_THEME_GIT_PROMPT_UNTRACKED"
|
||||
fi
|
||||
|
||||
if [[ $(echo ${gitstat} | wc -l | tr -d ' ') == 0 ]]; then
|
||||
echo -n "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ autoload -U url-quote-magic
|
|||
zle -N self-insert url-quote-magic
|
||||
|
||||
## file rename magick
|
||||
autoload -U zmv
|
||||
bindkey "^[m" copy-prev-shell-word
|
||||
|
||||
## jobs
|
||||
|
|
|
|||
3
lib/python.zsh
Normal file
3
lib/python.zsh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function wo() {
|
||||
[ -f './.venv' ] && workon `cat ./.venv`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue