[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
> 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.
> ProgClub programming
> programming at progclub.org
|_|_|O| Because every programmer needs a good club!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 231 bytes
Desc: not available
More information about the programming