mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-22 01:07:36 +08:00
Compare commits
6 Commits
b721053c87
...
ff0d490915
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff0d490915 | ||
|
|
4ac36d57f1 | ||
|
|
a3ea785cf5 | ||
|
|
570729f221 | ||
|
|
77b409d5c2 | ||
|
|
a25efd1e31 |
@ -1,3 +1,6 @@
|
||||
# Don't continue if direnv is not found
|
||||
command -v direnv &>/dev/null || return
|
||||
|
||||
_direnv_hook() {
|
||||
trap -- '' SIGINT;
|
||||
eval "$(direnv export zsh)";
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
# Open folder in ForkLift.app or ForkLift2.app from console
|
||||
# Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de
|
||||
# Updated to support ForkLift 2 and ForkLift 3 by Johan Kaving
|
||||
# Updated to support ForkLift from Setapp by Paul Rudkin
|
||||
#
|
||||
# Usage:
|
||||
# fl [<folder>]
|
||||
@ -24,6 +25,13 @@ function fl {
|
||||
fi
|
||||
osascript 2>&1 1>/dev/null <<END
|
||||
|
||||
try
|
||||
tell application "Finder"
|
||||
set forkLiftSetapp to name of application file id "com.binarynights.forklift-setapp"
|
||||
end tell
|
||||
on error err_msg number err_num
|
||||
set forkLiftSetapp to null
|
||||
end try
|
||||
try
|
||||
tell application "Finder"
|
||||
set forkLift3 to name of application file id "com.binarynights.ForkLift-3"
|
||||
@ -46,7 +54,12 @@ function fl {
|
||||
set forkLift to null
|
||||
end try
|
||||
|
||||
if forkLift3 is not null and application forkLift3 is running then
|
||||
if forkLiftSetapp is not null and application forkLiftSetapp is running then
|
||||
tell application forkLiftSetapp
|
||||
activate
|
||||
set forkLiftVersion to version
|
||||
end tell
|
||||
else if forkLift3 is not null and application forkLift3 is running then
|
||||
tell application forkLift3
|
||||
activate
|
||||
set forkLiftVersion to version
|
||||
@ -62,7 +75,9 @@ function fl {
|
||||
set forkLiftVersion to version
|
||||
end tell
|
||||
else
|
||||
if forkLift3 is not null then
|
||||
if forkLiftSetapp is not null then
|
||||
set appName to forkLiftSetapp
|
||||
else if forkLift3 is not null then
|
||||
set appName to forkLift3
|
||||
else if forkLift2 is not null then
|
||||
set appName to forkLift2
|
||||
|
||||
@ -19,10 +19,11 @@ plugins=(... git)
|
||||
| gau | git add --update |
|
||||
| gav | git add --verbose |
|
||||
| gap | git apply |
|
||||
| gapt | git apply --3way |
|
||||
| gb | git branch |
|
||||
| gba | git branch -a |
|
||||
| gbd | git branch -d |
|
||||
| gbda | git branch --no-color --merged \| command grep -vE "^(\+\|\*\|\s*(master\|development\|develop\|dev)\s*$)" \| command xargs -n 1 git branch -d |
|
||||
| gbda | git branch --no-color --merged \| command grep -vE "^(\+\|\*\|\s*(master\|development\|develop\|devel\|dev)\s*$)" \| command xargs -n 1 git branch -d |
|
||||
| gbD | git branch -D |
|
||||
| gbl | git blame -b -w |
|
||||
| gbnm | git branch --no-merged |
|
||||
@ -100,7 +101,7 @@ plugins=(... git)
|
||||
| glola | git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all |
|
||||
| glog | git log --oneline --decorate --graph |
|
||||
| gloga | git log --oneline --decorate --graph --all |
|
||||
| glp | `_git_log_prettily` |
|
||||
| glp | git log --pretty=\<format\> |
|
||||
| gm | git merge |
|
||||
| gmom | git merge origin/master |
|
||||
| gmt | git mergetool --no-prompt |
|
||||
@ -171,6 +172,11 @@ plugins=(... git)
|
||||
| glum | git pull upstream master |
|
||||
| gwch | git whatchanged -p --abbrev-commit --pretty=medium |
|
||||
| gwip | git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]" |
|
||||
| gam | git am |
|
||||
| gamc | git am --continue |
|
||||
| gams | git am --skip |
|
||||
| gama | git am --abort |
|
||||
| gamscp | git am --show-current-patch |
|
||||
|
||||
### Deprecated aliases
|
||||
|
||||
|
||||
@ -38,11 +38,12 @@ alias gapa='git add --patch'
|
||||
alias gau='git add --update'
|
||||
alias gav='git add --verbose'
|
||||
alias gap='git apply'
|
||||
alias gapt='git apply --3way'
|
||||
|
||||
alias gb='git branch'
|
||||
alias gba='git branch -a'
|
||||
alias gbd='git branch -d'
|
||||
alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|development|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
|
||||
alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|development|develop|devel|dev)\s*$)" | command xargs -n 1 git branch -d'
|
||||
alias gbD='git branch -D'
|
||||
alias gbl='git blame -b -w'
|
||||
alias gbnm='git branch --no-merged'
|
||||
@ -257,6 +258,12 @@ alias glum='git pull upstream master'
|
||||
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
|
||||
alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
|
||||
|
||||
alias gam='git am'
|
||||
alias gamc='git am --continue'
|
||||
alias gams='git am --skip'
|
||||
alias gama='git am --abort'
|
||||
alias gamscp='git am --show-current-patch'
|
||||
|
||||
function grename() {
|
||||
if [[ -z "$1" || -z "$2" ]]; then
|
||||
echo "Usage: $0 old_branch new_branch"
|
||||
|
||||
@ -25,16 +25,12 @@ function box_name {
|
||||
}
|
||||
|
||||
|
||||
local rvm_ruby='using%{$FG[243]%}$(ruby_prompt_info)'
|
||||
local git_info='$(git_prompt_info)'
|
||||
|
||||
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}${git_info} %{$FG[239]%}${rvm_ruby} %D - %*
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}\$(git_prompt_info)\$(ruby_prompt_info) %D - %*
|
||||
╰─$(virtualenv_info)$(prompt_char) "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX="‹"
|
||||
ZSH_THEME_RUBY_PROMPT_PREFIX=" %{$FG[239]%}using%{$FG[243]%} ‹"
|
||||
ZSH_THEME_RUBY_PROMPT_SUFFIX="›%{$reset_color%}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user