git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cdgit: cd relative to git workdir root
@ 2013-09-16 19:01 Thomas Koch
  2013-09-16 19:25 ` Adam Spiers
       [not found] ` <201309162101.14879.thomas-5j3myg3OO4w@public.gmane.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Koch @ 2013-09-16 19:01 UTC (permalink / raw)
  To: git-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, vcs-home

Hi,

I frequently have the need to cd back to the root of the current git workdir 
and created to alias for this:

git alias root = rev-parse --show-toplevel

shell alias cdgit = cd $(git root)

Maybe somebody likes this.

Now it would be cool, to have an alias to cd into a specific subdir of the git 
worktree and have zsh (or bash) auto completion for this like

git clone git://git.kernel.org/pub/scm/git/git.git
cd git/gitweb/static/js/lib (just to be somewhere deep)
cdgit con<tab>/com<tab> (becomes: cdgit contrib/completion)

Somebody with zsh/bash skills who already did this?

Regards, Thomas Koch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-17  5:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 19:01 cdgit: cd relative to git workdir root Thomas Koch
2013-09-16 19:25 ` Adam Spiers
     [not found] ` <201309162101.14879.thomas-5j3myg3OO4w@public.gmane.org>
2013-09-17  5:33   ` martin f krafft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).