[ProgClub programming] Announcing the base() shell function

John Elliot V | ProgClub jj5 at progclub.org
Thu Jun 20 20:43:32 AEST 2019

Thanks for the .gitconfig tip. I've added it like this:

        base = rev-parse --show-toplevel

I'm using the Salt Stack users-formula:


So I was able to push out this change by updating my user pillar data, e.g.:

       alias.base: 'rev-parse --show-toplevel'

I didn't create the 'wtaf' alias (or an appropriately named equivalent)
because I already have the base() function which handles that and more

On 19/6/19 6:32 pm, Jedd Rashbrooke wrote:
> On Wed, 19 Jun 2019 at 17:30, John Elliot V | ProgClub <jj5 at progclub.org
> <mailto:jj5 at progclub.org>> wrote:
>     I'm not sure I follow. How does that git config help you change
>     directory?
>  Seriously?
>  Put that alias into your git config.
>  Use 'git root' to show git repo you're in.  It won't be confused by
> submodules, presence of .svn directories, etc.
>  Optionally have an alias:
> * alias wtaf='cd $(git root)'*
>  .. to do the actual forcible relocation to the root of the current git
> repository, assuming that you're lost within directory structures often
> enough that this is useful.
>  j.
> _______________________________________________
> ProgClub programming
> programming at progclub.org
> https://www.progclub.org/cgi-bin/mailman/listinfo/programming
> https://www.progclub.org/

|_|O|_| ProgClub
|_|_|O| Because every programmer needs a good club!
|O|O|O| https://www.progclub.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jj5.vcf
Type: text/x-vcard
Size: 231 bytes
Desc: not available
URL: <http://www.progclub.org/pipermail/programming/attachments/20190620/2834ab83/attachment.vcf>

More information about the programming mailing list