-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
add ability for addon command aliases #33
Comments
I don't have good ideas how to implement it without overcomplicating the commands system. |
It is just an idea. I'm sure you have different means with aliases for commands defined within fin. |
I understand, but I had this idea already. If I knew how to implement it, I would probably have already implemented it. First I should say, that you already can create an alias yourself by creating a command-that-laucnhes-another-command. .docksal/commands/grn #!/bin/bash
## An alias for release-notes
fin release-notes "$@" But I would assume that's now what you mean. You'd probably expect to somehow define an alias inside the command, correct? If so, then while it is possible for fin to find it there, it would open 2 cans of worms:
Now the problems are solvable, but they would increase complexity of handling and launching custom commands three-fold. What is the benefit? The benefit is minimal. Mere seconds saved on typing the command name. And if someone does launch some command very often, then there is already a way to have it, command-that-laucnhes-another-command might feel patchy but it is actually not. So if there are other ideas how do define aliases for custom commands that would not open these cans of worms, we could discuss possibilities, but if there are no other good ideas, then I am not sure if this ticket has any perspectives. |
@achekulaev I think that the command to launch another command is a very sensible idea. Once a list of short versions of the command was agreed upon the commands could be added and the documentation for the long versions updated to include the shorcut command. The only downside I see is commands would get listed twice unless there was a way to say do not list the shortcut commands. |
@frederickjh nice. While thinking on your last message I realized that now I actually have an idea how to implement aliasing. Limitation: this would only be applicable to addons, only 1 alias per addon. Example: Main file: How it addresses the issues described above:
|
Some command names are giving longer names for recognition purposes but are terrible for typing often. I like to shorten whenever I can. So, if we can add the ability to create an "alias" command name. For instance, sequelpro can be sqlp. I'm working on an addon that will generate release notes in various formats (from Drupal's grn module). While
fin release-notes
would be recognizable,fin grn
would be faster to type.The text was updated successfully, but these errors were encountered: