Fabric
Fabric copied to clipboard
[Feature request]: Namespace / prefix for fabric aliases
What do you need?
Being brand new to the project, this is a very humble request, not meaning to step on Daniel's toes if there are reasons why it's not a good idea. However, there are already 103 patterns, and counting. Although they are amazing, speaking as a linux/bash user, they do tend to pollute the environment. Wouldn't it be better if they all had a common prefix? fab_ seems like a perfect one to me, considering fabric is "fab(ulous)". This would have the added bonus of making tab completion much more useful, because fab_ followed by a
If I understand correctly what you are saying, I tried unsuccessfully ( https://github.com/danielmiessler/fabric/issues/318) twice to address this. I have an updated bash script if you are interested.
On Wed, May 29, 2024 at 5:33 PM superclarkk @.***> wrote:
What do you need?
Being brand new to the project, this is a very humble request, not meaning to step on Daniel's toes if there are reasons why it's not a good idea. However, there are already 103 patterns, and counting. Although they are amazing, speaking as a linux/bash user, they do tend to pollute the environment. Wouldn't it be better if they all had a common prefix? fab_ seems like a perfect one to me, considering fabric is "fab(ulous)". This would have the added bonus of making tab completion much more useful, because fab_ followed by a would list all the fabric commands/patterns.
— Reply to this email directly, view it on GitHub https://github.com/danielmiessler/fabric/issues/447, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPVKQXCNTMGOJNH2AZUJLTZEZCTFAVCNFSM6AAAAABIPXLUW2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZDIMRYGM3DCNQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
No. I think what you're looking for in #318 is this...
https://github.com/danielmiessler/fabric/discussions/312
However, I think you'd be better off using aliases. These are sourced from $HOME/.config/fabric/fabric-bootstrap.inc.
I could easily rename the aliases with a prefix, but that would need to be done again with each install. It would be much better to have a standard baked in.
Regarding #312 and #318
Shell completions for Fabric has been implemented for a while now.
You can even install them using a one-line curl command::
https://github.com/danielmiessler/Fabric?tab=readme-ov-file#quick-install-no-clone-required
I'm closing this old issue. If you have any usability issues with Fabric, feel free to create a new issue and I'll take a look.
@ksylvan Please re-read the original issue. This ticket is not about bash completion. It's about environment pollution. Please re-open.
Actually, hold off on my last request. I haven't used fabric since version 1.2, so maybe it's not applicable now. I'll report back after I've upgraded, and if the original issue hasn't already been addressed.
See Add aliases for all patterns.
"In order to add aliases for all your patterns and use them directly as commands ie. summarize instead of fabric --pattern summarize"
When you make them commands, they pollute the environment, as stated in the original post. If you gave them a common prefix, then they would be much more user friendly and intuitive.
@superclarkk I see what you mean. For example, if all the commands started with "f_"
@superclarkk I changed the README sections about the command aliases like this:
See https://github.com/danielmiessler/Fabric?tab=readme-ov-file#add-aliases-for-all-patterns
This change gives you the ability to prefix all your fabric patterns with "fab_" if you wish, and it's a nonbreaking change.
That's a neat solution. Thank you!