-
-
Notifications
You must be signed in to change notification settings - Fork 780
Closed
Labels
Description
If you press ^G
to exit nnn or have configured quitcd, nnn writes a cd
command in POSIX-shell syntax into ~/.config/nnn/.lastd
. While fish syntax is similar to POSIX, they differ on their handling of backslashes in single-quoted strings. In particular, if nnn writes a path ending in a backslash into .lastd
, and you source .lastd
in fish you get Unexpected end of string, quotes are not balanced
.
To fix this, nnn should write the raw (unescaped) path to ~/.config/nnn/.lastd_raw
or stdout so that you don't need to parse the escaped path in fish. This would probably also be helpful for nushell, where you currently need to do some horrible string parsing to extract the path from .lastd
.