mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
more git aliases, less pager, iterm2 support
This commit is contained in:
parent
bab71ac7cb
commit
7268805d36
3 changed files with 24 additions and 1 deletions
|
|
@ -2,6 +2,15 @@
|
|||
|
||||
ohmyzsh=$HOME/.oh-my-zsh
|
||||
|
||||
gcohistory() {
|
||||
i=0
|
||||
while [ $? -eq 0 ]; do
|
||||
i=$((i+1))
|
||||
echo -n "$i. "
|
||||
git rev-parse --symbolic-full-name @{-$i} 2> /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
# Get operating system
|
||||
platform='unknown'
|
||||
unamestr=$(uname)
|
||||
|
|
@ -35,7 +44,7 @@ TRAPHUP() {
|
|||
source $ohmyzsh/custom/aliases.zsh
|
||||
}
|
||||
|
||||
alias ae='vi $ohmyzsh/custom/aliases.zsh' #alias edit
|
||||
alias ae='vi $ohmyzsh/custom/aliases.zsh' #alias edit
|
||||
alias arl='source $oh-my-zsh/custom/aliases.zsh' #alias reload
|
||||
alias gar="killall -HUP -u \"$USER\" zsh" #global alias reload
|
||||
|
||||
|
|
@ -60,3 +69,14 @@ if [ ! "$MSYSTEM" = "MINGW64" ]; then
|
|||
alias ls='exa'
|
||||
alias la='ll -a'
|
||||
fi
|
||||
|
||||
# git
|
||||
alias gcoh="gcohistory"
|
||||
alias gld="git log --pretty=format:'%C(yellow)%h%C(reset) - %an [%C(green)%ar%C(reset)] %s'"
|
||||
alias glsi='git ls-files --other --ignored --exclude-standard'
|
||||
alias galiases='git config -l | grep alias | cut -c 7-'
|
||||
alias gls='git log --stat --decorate --source -p'
|
||||
alias glhistg="git log --graph --pretty=format:'%C(yellow)%h%C(bold white red)%d%Creset %s %C(bold green)%cr %Creset%C(white)%an' --abbrev-commit --date=relative"
|
||||
alias gdmb='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
|
||||
alias gdtree='git diff-tree'
|
||||
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@
|
|||
autocrlf = false
|
||||
editor = vim
|
||||
excludesfile = ~/.yadr/git/gitignore
|
||||
pager = less -F -X
|
||||
[advice]
|
||||
statusHints = false
|
||||
[diff]
|
||||
|
|
@ -142,3 +143,4 @@
|
|||
program = gpg
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ esac
|
|||
# macOS only optional plugins
|
||||
case "$(uname)" in
|
||||
Darwin) plugins+=(
|
||||
iterm2
|
||||
brew
|
||||
forklift # requires ForkLift from App Store
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue