luben / sctags

Ctags and Etags extractor for Scala
Apache License 2.0
33 stars 4 forks source link

Follow symlinks until final destination #6

Closed mic47 closed 6 years ago

mic47 commented 6 years ago

On some systems (like ubuntu 18.04), readlink does not directly send you to the correct destination, but to alternatives. See this example

> which scala
/usr/bin/scala
> readlink $(which scala)
/etc/alternatives/scala

Readlink has -f option, which follows links recursively. That way it will always find the correct destination.

luben commented 6 years ago

Thanks!