Skip to content

gtg-min alias definition resolves tag permanently #43

@nathanperkins

Description

@nathanperkins

Using double-quotes to define the gtg-min alias causes the tag to be permanently resolved when defining the alias, rather than when the alias is called.

$ alias gtg-min="git tag -s -a $(git-semver -target minor)"
$ alias gtg-min
alias gtg-min='git tag -s -a 0.2.0'

Then, calling the alias multiple times uses the same tag and fails:

$ gtg-min
fatal: tag '0.2.0' already exists

Using single-quotes fixes the issue:

$ alias gtg-min='git tag -s -a $(git-semver -target minor)'
$ alias gtg-min
alias gtg-min='git tag -s -a $(git-semver -target minor)'

Seems like pretty standard bash behavior but in case the version is interesting:

$ bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions