expand-file-name
do the similar things like readlink
(or file-ftruename
if you want to follow the symlink as mention by @hraban).
If you want to copy file path with a similar interface like find-file
, here are two options to achieve it:
- use
expand-file-name
to write your copy path function and add it tocounsel-find-file
actions and call it throughM-o
when you select the file. For more details, see ivy actions - use embark and run
embark-action w
.