4 ms·
I think bash has an alias “rehash” that does the same as hash -r too. But zsh doesn’t have it, so “hash -r” has entered my muscle memory, as it works in both sh
by ninkendo 1y ago
I think bash has an alias “rehash” that does the same as hash -r too. But zsh doesn’t have it, so “hash -r” has entered my muscle memory, as it works in both shells.
Edit: wrong shell, zsh has rehash, bash does not.
- codesnik 1y agobut zsh has "rehash"? for as long as I remember.
- ninkendo 1y agoBah, you’re right! I got it backwards, it’s zsh that has rehash, bash does not. And hash -r works in both. I guess I’ve been using zsh longer than I thought, because I learned about rehash first, then made the switch to hash -r later. I started using zsh 14 years ago, and bash 20+ years ago, so my brain assumed “I learned about rehash first” must have been back when I was using bash. zsh is still “that new thing” in my head.
- macrocosmos 1y agoIf there is something nice that one has and one does not have. zsh is the one that has it.
- semiquaver 1y agoCounterpoint, /dev/udp pseudo-devices in bash.
- NikkiA 1y agothe odd thing is, at some point I ended up with `hash -R` as muscle memory that I always type before I correct it to a lower case r, and I'm not sure why, I can't remember any shell that uses `-R`.