-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quitcd not working in fish if path contains backslash #1957
Comments
ping: @BeyondMagic |
Hey, it's not terrible! It's just... tricky! But yep, it'd be better for Nushell as well the raw path. |
Oh, I just realized the bug is in fish shell not nushell. Anyways...
Stdout can be used by plugins, so no.
The path for last directory is not hardcoded, it depends on |
@PatrickF1 Since you've contributed to |
Hi, sorry I don't use nnn anymore. |
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: