git-number icon indicating copy to clipboard operation
git-number copied to clipboard

git-number -c cd

Open KES777 opened this issue 13 years ago • 2 comments

please introduce this command which will change directory where chosen file are placed;

Unmerged paths:

(use "git add/rm ..." as appropriate to mark resolution)

#1631 both modified: lib/FrontOffice/Controller/Domain/Service.pm

so git-number-cd 1631 will 'cd' to directory where Service.pm is: cd lib/FrontOffice/Controller/Domain/

KES777 avatar Oct 24 '12 08:10 KES777

You can use this shell function to do this:

gcd() {
        test -n "$1" && cd $(dirname $(git list $1))
}

$ gcd 1631
# Should cd you to lib/FrontOffice/Controller/Domain

holygeek avatar Oct 24 '12 12:10 holygeek

add that to usage examples in doc. That will be handy to have that command from "The BOX" as 'ga' done.

That is hard to write so complicated expressions... (((

KES777 avatar Oct 24 '12 19:10 KES777