You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Oh, I just realized the bug is in fish shell not nushell. Anyways...
or stdout
Stdout can be used by plugins, so no.
nnn should write the raw (unescaped) path to ~/.config/nnn/.lastd_raw
The path for last directory is not hardcoded, it depends on $NNN_TMPFILE. Randomly adding new temp file or changing the format of the existing file isn't good. Feel free to send a PR fixing the fish shell script instead.
If you press
^G
to exit nnn or have configured quitcd, nnn writes acd
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 getUnexpected 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
.The text was updated successfully, but these errors were encountered: