Skip to content

RFE: make stg.alias config more like git.alias #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
larsks opened this issue Feb 26, 2021 · 2 comments
Closed

RFE: make stg.alias config more like git.alias #97

larsks opened this issue Feb 26, 2021 · 2 comments

Comments

@larsks
Copy link
Contributor

larsks commented Feb 26, 2021

For whatever reason, my fingers really want to type stg list rather than stg series. I thought maybe I could make my fingers happy like this:

git config stg.alias.list series

But that doesn't work, because stg assumes that aliases point to shell commands. It would be nice if alias processing worked more like it does for git.alias, so that the above example would work and for existing aliases (like stg mv) would be written like:

git config stg.alias.mv '!git mv'
@larsks larsks changed the title RFE: make stg alias support more like git alias support RFE: make stg.alias config more like git.alias Feb 26, 2021
@NonLogicalDev
Copy link
Contributor

NonLogicalDev commented May 6, 2021

Hey @larsks, so long as you don't care about shell interpolation what you want to do is quite simple:

[stgit.alias]
  list = stg series

And even in case you do want something more fancy, there are still workarounds:

[stgit.alias]
  gn     = git stg-gn
  gp     = git stg-gp
[alias]
  stg-gn = !stg goto $(stg next)
  stg-gp = !stg goto $(stg prev)

But I would really love to see shell interpolation in the stg.aliases to avoid having to resort to hacks like these.

@larsks
Copy link
Contributor Author

larsks commented May 6, 2021

Thanks for the pointer! Not quite like git aliasing, which is why it's non obvious, but works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants