Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Is this doable in TCC?

samintz

Scott Mintz
May
1,582
27
I have a git alias that does this:
Code:
alias.last-good-tag !git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1) --exclude '*FAIL*'

It works great as long as I invoke it using git - e.g. git last-good-tag.
However, it fails if I run the command from TCC because of the embedded subcommand $(git rev-list --tags --max-count=1).
This works
Code:
git describe --tags --abbrev=0 %@execstr[git rev-list --tags --max-count=1] --exclude '*FAIL*'
However, it is limited to a single line of output. If I start git-bash, and type the command and use --max-count=10, I get ten lines of output.

Is this even doable in TCC?
 
I don't understand. Is there supposed to be a dot in here: "alias.last-good-tag"?

What problem does "$(git rev-list --tags --max-count=1)" cause? Isn't it just plain text to TCC?
 
OK, I think I have the picture. Try this.

Code:
v:\> alias crunch
tpipe /replace=4,0,0,0,0,0,0,0,0,"[ \r\n\t]+?"," "

And use @EXECSTR[git ... | crunch] for the subcommand.

Crunch replaces sequences of characters from the set {space, tab, CR, LF} with a single space (much like bash's $(command)).
 

Similar threads

Back
Top