Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
714399a7
Unverified
Commit
714399a7
authored
Oct 06, 2019
by
fanuch
Committed by
Marc Cornellà
Oct 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
568584a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
README.md
plugins/git/README.md
+1
-0
git.plugin.zsh
plugins/git/git.plugin.zsh
+7
-0
No files found.
plugins/git/README.md
View file @
714399a7
...
...
@@ -47,6 +47,7 @@ plugins=(... git)
| gcb | git checkout -b |
| gcf | git config --list |
| gcl | git clone --recurse-submodules |
| gccd | git clone --recurse-submodules "$@" && cd "$(basename $_ .git)" |
| gclean | git clean -id |
| gpristine | git reset --hard && git clean -dffx |
| gcm | git checkout $(git_main_branch) |
...
...
plugins/git/git.plugin.zsh
View file @
714399a7
...
...
@@ -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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment