@b0rk the reason I use this is that my ~/.profile and ~/.bashrc files mix direct assignment to $PATH with appending/prepending values, in some cases because that's how external tools I call have set themselves up. This deduplication hack lets me insert synchronization points that ensure re-source'ing my ~/.bashrc is idempotent, instead of accumulating a longer and longer value which I usually fail to notice.
2/2