Compare commits

..

2 commits

Author SHA1 Message Date
7383759af6
Stop calling git in aliases
we might not be in a git dir
2023-08-26 21:36:54 -04:00
6c43a5b84d
Slight branch display change 2023-08-26 21:17:54 -04:00
3 changed files with 13 additions and 3 deletions

View file

@ -13,7 +13,7 @@ alias ber="bundle exec rake"
alias bet="test-rails" alias bet="test-rails"
alias c="clear" alias c="clear"
alias cs="toggle-color-mode" alias cs="toggle-color-mode"
alias cdr='cd $(git root)' alias cdr="git-root"
alias dc="docker-compose-call" alias dc="docker-compose-call"
alias g="g" # overwrite g alias alias g="g" # overwrite g alias
alias ga="git add" alias ga="git add"
@ -54,7 +54,7 @@ alias grbi="git rebase --interactive"
alias grc="git rm --cached" alias grc="git rm --cached"
alias grh="git reset --hard" alias grh="git reset --hard"
alias grm="git rm" alias grm="git rm"
alias gst="git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline" alias gst="git-since-last-tag"
alias gack='git log --pretty="%an <%ae>" | sort -u | fzf | xargs -I "{}" git add-trailer "Co-authored-by: {}"' alias gack='git log --pretty="%an <%ae>" | sort -u | fzf | xargs -I "{}" git add-trailer "Co-authored-by: {}"'
alias gup="git-branch-delete-merged" alias gup="git-branch-delete-merged"
alias Grep='grep' alias Grep='grep'

View file

@ -70,6 +70,16 @@ function git-date-added {
fi fi
} }
function git-since-last-tag {
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline
}
function git-root {
if [[ "$(git rev-parse --is-inside-work-tree)" == "true" ]]; then
cd $(git root)
fi
}
function password-generator { function password-generator {
if [ -x "$(command -v openssl)" ]; then if [ -x "$(command -v openssl)" ]; then
password=$( password=$(

View file

@ -3,7 +3,7 @@ precmd() {
autoload -Uz vcs_info autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*:prompt:*' formats "[%b]" zstyle ':vcs_info:*:prompt:*' formats "(%b)"
vcs_info 'prompt' vcs_info 'prompt'
} }