Hacker News new | past | comments | ask | show | jobs | submit
> Above modern bindings are activated also when the name of nano's executable (or a symlink to it) starts with the letter "e".

Maybe stupid question but do you then need to run nano through the symlink to get the new bindings or is the existence of a symlink enough? Wouldn’t nano have to check every directory for a symlink to itself to do that? There’s no way to get all symlinks for a specific file without checking the whole file system, right?

I believe you have to run it through the symlink, and that it just checks argv[0] to decide. It’s the same Vim does, FWIW: if you run it via a symlink called `vi` it enters a vi-compatible mode, and if you run it as `evim` it suddenly acts as a non-modal text editor, and as `vimdiff` it enters the diff mode.