Hacker News new | past | comments | ask | show | jobs | submit login

Git's subcommand aliasing, but for arbitrary tools. Git has the capability to configure aliases, distinct from shell aliases, for its commands. E.g. 'git cm' = 'git commit'

I had a fairly naive, limited Bash script wrapping docker to provide something similar, but for fun I decided to rewrite it in Golang with arbitrary command support. Turns out that Go is not my cuppa so I rewrote it again in C# (my go-to), using the AOT compilation as well. Something like this probably already exists but writing it is about the journey, the fun of problem solving.

It will ultimately be a simple translator from a convenient config format (e.g. something like below) to shell commands, so nothing special. Just a useful tool for my day to day.

[command="git",exec="/bin/bash"]

        cm = commit

        cm <CommitMessage:alphanumeric> = commit -m "$CommitMessage"

        cm pop <CommitCount:int> = reset HEAD~$CommitCount



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: