JanDeDobbeleer / aliae

Cross shell and platform alias management
https://aliae.dev
MIT License
73 stars 3 forks source link

git alias evaluates at the time of loading profile #87

Closed harrhp closed 5 months ago

harrhp commented 5 months ago

Code of Conduct

What happened?

aliae config

alias:
  - name: db
    value: "!basename $(git symbolic-ref refs/remotes/origin/HEAD)"
    type: git

after reloading profile git config looks like this

[alias]
db = "!basename "

or like this if reloaded in context of git repository

[alias]
db = !basename refs/remotes/origin/master

expected to see this

[alias]
db = !basename $(git symbolic-ref refs/remotes/origin/HEAD)

What OS are you seeing the problem on?

Windows, Linux

Which shell are you using?

bash, powershell

JanDeDobbeleer commented 5 months ago

@harrhp this is a tricky one. That statement, when evaluated by the shell will always execute in the evaluation. This can be intentional or not, so how do we distinct between that?