How to? Is this doable in TCC?

samintz

Scott Mintz
May 20, 2008
1,433
13
Solon, OH, USA
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?
 
May 20, 2008
10,670
83
Syracuse, NY, USA
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?
 
May 20, 2008
10,670
83
Syracuse, NY, USA
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)).