Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@UlisesAlexanderAM
Copy link

@UlisesAlexanderAM UlisesAlexanderAM commented Nov 9, 2020

I add some aliases for yay. I tried to add it as helper_yay but I couldn't source it automatically.
Also include the modifications I add on #1 .

@ericbn
Copy link
Member

ericbn commented Nov 14, 2020

Hola @UlisesAlexanderAM. There's already a mechanism in place to source ${0:h}/helper_${helper}.zsh if it exists. So looks like you should define your yay aliases in helper_yay.zsh. @Eriner, it's that the idea with helpers?

Also some of your yay aliases may clobber existing tools, like yq.

I don't use arch, so I can't evaluate your new aliases here. @Eriner, an you check this out?

@ericbn ericbn closed this Nov 14, 2020
@ericbn ericbn reopened this Nov 14, 2020
@UlisesAlexanderAM
Copy link
Author

Hi @ericbn. I modified some aliases to avoid clobbering with existing tools as you suggest.

About the helper_yay.zsh originally I use it but even if I write zstyle ':zim:pacman' helpers 'yay' in .zshrc aliases doesn't work, neither work the helper_aur.zsh with the original pacman module and writing zstyle ':zim:pacman' helpers 'aur'. That's why I change the name and source it manually.

@ericbn
Copy link
Member

ericbn commented Nov 20, 2020

Hola @UlisesAlexanderAM.

I think the aliases work better when they have a common prefix and then just one or two letters after that. And "yay" would de a really short prefix for yay (instead of "y"). :- )

Second, I've just pushed commits to the master branch that fix the loading of the helper files. That was a regression introduced by me in one of the last previous commits.

I'll leave the final decisions regarding the changes proposed here to @Eriner.

* Rename yay-aliases.zsh to helper_yay.zsh
* Delete manual source of the old file
@UlisesAlexanderAM
Copy link
Author

Hi @ericbn.
I test your fix and now it works with helper_yay.zsh so I rename the file and delete the line that source the old file.
I agree with you about the prefixes but I'll wait for @Eriner opinion and then change them and move them from a separate section to the helpers section in the README.

@Eriner
Copy link
Member

Eriner commented Nov 23, 2020

I'm hesitant to accept this PR, only because for 90% of these aliases one could just set the zpacman_frontend=yay.

The majority of the aliases, from my brief review, are just pacman pass-throughs, as noted in the comment above.

@Eriner
Copy link
Member

Eriner commented Nov 23, 2020

somemgr_helper.zsh was intended to extend the frontend (aura, yaourt, yay, etc.) where aliases are necessary for the additional functionality that these utilities provide (beyond that of pacman).

@UlisesAlexanderAM
Copy link
Author

Hi @Eriner.

I did it this way because it is the way I do things but now I realize how inneficient it is. So, I'll delete the alias that are just pacman pass-through and add some that are related to the additional funtionality that yay provide.

And thanks for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants