fd conflicts with oh-my-zsh common alias fd for find directories

Created on 12 Oct 2017  Â·  8Comments  Â·  Source: sharkdp/fd

if you have installed oh-my-zsh the default common aliases includesfd which searches for directories.

Took me a while to figure it out

I know this is BIG change but it would be a better idea to give the project a more meaningful name and let users alias the command to fd or something else.

question

Most helpful comment

@fddayan That is unfortunate.

I knew that there was a price to pay (name clashes, harder to find) when naming this fd, but I wanted to have something short like rg, ag, ls, etc. Of course, I could have asked all users to set an alias fd, but somehow that doesn't seem very user-friendly to me.

I'm also a user of oh-my-zsh and (as well as for @Detegr) that alias was not enabled for me. Counting across all plugins, oh-my-zsh defines over 1000 different aliases (146 of these are in the two-letter namespace). I don't want to blame them, but I don't think we should change fds name just to avoid a clash with one of these many aliases. Especially if it's not enabled by default.

Personal opinion: I love aliases on the shell, but they are only useful if I have defined them on my own (because I will not remember them otherwise). I love oh-my-zsh, but I don't think I use any of the aliases that it defines.

It's probably obvious, but if you want to keep that oh-my-zsh alias, you can also simply define a new name for fd:

alias fnd='\fd'

All 8 comments

Which plugin adds fd alias? I've been using oh-my-zsh for a long time and do not have fd bound to anything at the moment.

grep -r 'find . -type d -name' ~/.oh-my-zsh

~/.oh-my-zsh/plugins/common-aliases/common-aliases.plugin.zsh:alias
fd='find . -type d -name'

On Thu, Oct 12, 2017 at 10:51 AM, Antti Keränen notifications@github.com
wrote:

Which plugin adds fd alias? I've been using oh-my-zsh for a long time and
do not have fd bound to anything at the moment.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sharkdp/fd/issues/104#issuecomment-336143383, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALiCEBPALUA_5bgVKu011ZIQTiRb7-Nks5srhlTgaJpZM4P23pI
.

--
Federico Dayan

@fddayan That is unfortunate.

I knew that there was a price to pay (name clashes, harder to find) when naming this fd, but I wanted to have something short like rg, ag, ls, etc. Of course, I could have asked all users to set an alias fd, but somehow that doesn't seem very user-friendly to me.

I'm also a user of oh-my-zsh and (as well as for @Detegr) that alias was not enabled for me. Counting across all plugins, oh-my-zsh defines over 1000 different aliases (146 of these are in the two-letter namespace). I don't want to blame them, but I don't think we should change fds name just to avoid a clash with one of these many aliases. Especially if it's not enabled by default.

Personal opinion: I love aliases on the shell, but they are only useful if I have defined them on my own (because I will not remember them otherwise). I love oh-my-zsh, but I don't think I use any of the aliases that it defines.

It's probably obvious, but if you want to keep that oh-my-zsh alias, you can also simply define a new name for fd:

alias fnd='\fd'

Just a drive-by suggestion for findr.

@lewisinc Yeah, I renamed it as rfind (regex-find) :P

got it. thanks. Just a suggestions

On Thu, Oct 12, 2017 at 7:58 PM, J.W notifications@github.com wrote:

@lewisinc https://github.com/lewisinc Yeah, I renamed it as rfind
(regex-find) :P

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sharkdp/fd/issues/104#issuecomment-336302883, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AALiCKzWxyoNBuFbInX7rz_9MjIY5ZA0ks5srpmEgaJpZM4P23pI
.

--
Federico Dayan

@fddayan Thanks for asking.

BTW for those wondering: unalias fd should fix the problem :smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

christianbundy picture christianbundy  Â·  3Comments

lespea picture lespea  Â·  4Comments

kclevenger picture kclevenger  Â·  3Comments

hungptit picture hungptit  Â·  3Comments

mwgkgk picture mwgkgk  Â·  3Comments