mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-16 01:38:11 +02:00
feat(git): add gccd
alias to clone and cd into git repository (#8220)
Fixes #8216 Closes #8220 Co-authored-by: Nelson Estevão <nelsonmestevao@gmail.com>
This commit is contained in:
@ -97,6 +97,13 @@ alias gcas='git commit -a -s'
|
||||
alias gcasm='git commit -a -s -m'
|
||||
alias gcb='git checkout -b'
|
||||
alias gcf='git config --list'
|
||||
|
||||
function gccd() {
|
||||
command git clone --recurse-submodules "$@"
|
||||
[[ -d "$_" ]] && cd "$_" || cd "${${_:h}%.git}"
|
||||
}
|
||||
compdef _git gccd=git-clone
|
||||
|
||||
alias gcl='git clone --recurse-submodules'
|
||||
alias gclean='git clean -id'
|
||||
alias gpristine='git reset --hard && git clean -dffx'
|
||||
|
Reference in New Issue
Block a user