1

I'm using zsh on Mac OS 10.6.8.

So, all of a sudden one of my machines asks me for confirmation every time I rm.

Frankly, I hate this with an abiding passion. I've never had a problem with rm, and I don't need to debate the potentialities.

First thing I did was which rm, which reports rm: aliased to rm -i.

Now, I've hunted high and low for this alias. zshrc, .config (which I don't have), the default zshrc files: everywhere I can think of. No mention of aliasing rm anywhere.

Is there a simple way to determine where this alias is being configured? Or to list all locations where zsh might be looking for config lines?

fedorqui
  • 275,237
  • 103
  • 548
  • 598
Marshall Eubanks
  • 265
  • 2
  • 14
  • Maybe most likely it comes from /etc/profile (because Apple decided it would be a good idea to make this a system-wide default)? The zsh manpage should list all files ZSh sources on startup – P Varga Feb 04 '12 at 16:28

1 Answers1

2

Nope, there's no way to know which startup file an alias has been configured from, sort of searching them yourself.

The Z-shell startup files can be found here.

A comment for the question suggests /etc/profile; this is incorrect (unless you're sourcing it yourself), as /etc/profile is a Bourne-type shell startup file.

If you can't find the place it's sourced, you could unset the alias [bottom paragraph] in ~/.zshrc: unset rm. That should work provided it's done after the alias is set.

simont
  • 68,704
  • 18
  • 117
  • 136