-
-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
need contributor / plug-in guidelines on aliases and disabling setting of aliases #6630
Comments
As an additional note, the aliases should probably be opt-in so they don't just overwhelm new users and you are given a chance to explore them and ideally understand them a little before turning them on. |
Not only the aliases should be optin but also (un)setopt's... |
The directories aliases are getting in my way a lot. It'd really be nice if I could disable them. |
This is really needed. I don't want aliases that I don't know where it is defined and how to enable/disable. |
Ran into this today with aliases defined in Current problems
ProposalProvide a mechanism within ZSH for registration of aliases. This mechanism would keep track of a mapping of aliases, their recommended labels, and the shell snippets they contain. ZSH could them provide further mechanisms to allow interaction with this alias store to do things like enable, disable, or rename an alias. In abstract, I think it'd look something like this:
This would ideally result in the following behavior:
Does this sound like overkill? I'd be happy to contribute something like this, but there'd still be open questions about interface and migration paths. Open questions off the top of my head:
Cheers! 🍻 |
i'm not a fan of OMZ providing aliases for commands that have been around forever without the user opting in. Having an alias for 'ls' really annoys me, for example. I've used someone's Extended-LS (els) for a long time, modified it to support colors, commas in the size field, glyphs for file types and hg status; written in C and doesn't require ruby or any other silly add-ons. I have 'ls' defined as a function and apparently zsh using a function or an alias with the same name differs between OS X and linux...linux calls aliases first. Like posters above, spent a long time chasing down why I suddenly had a broken ls on linux and where the alias was getting created. I love that OMZ brings a lot of zsh tools together from everywhere, but I also like being able to select what I want to use and don't like stuff being forced on me. |
Closes ohmyzsh#9414, resolves ohmyzsh#8344, closes ohmyzsh#7328, closes ohmyzsh#6630, resolves ohmyzsh#8933, resolves ohmyzsh#8015, closes ohmyzsh#9621
There's a proposal for a way to turn off aliases in #10644. Please have a look and add your feedback. Thanks! |
This was implemented in #11550, see https://github.com/ohmyzsh/ohmyzsh#skip-aliases for how to use it. |
Some good discussion has already happened in #5721 but this is an issue not just limited to the plugin for git.
Some examples:
#4780
#5214
#5288
#5313
#5766
#5774
#5783
#6062
#6601
There needs to be some form of guidance on how to add aliases while being a good citizen, especially since some aliases can be very dangerous and destructive. It would be nice to adopt the added functionality that many plugins provide, but have the option to use, or not use the aliases provided by the plugin.
Similarly, the libraries also exhibit some of this.
lib/directories.zsh
creates 23 aliases on it's own,lib/misc.zsh
creates 2 different aliases forsudo
. In comparison,lib/correction.zsh
also creates a number of aliases, but they are gated behind an option so I can easily enable or disable them.I've avoided some plugins because of the sheer number of aliases I'd be "forced" to have from them. For the 23 aliases from
lib/directories.zsh
I resorted to creating an emptycustom/lib/directories.zsh
to disable them. I don't consider it to be realistic to have each user have to check every update to see if any new aliases were created, then add anunalias yet_another_alias
for every new unwanted alias.The text was updated successfully, but these errors were encountered: