fix nu quitcd: switched quotes (#1737)

Closes: https://github.com/jarun/nnn/issues/1736
This commit is contained in:
J-Kappes 2023-09-30 18:19:01 +02:00 committed by GitHub
parent 3176eaa85c
commit afe84862ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,8 @@ def-env n [...x] {
^nnn ($x | str join) ^nnn ($x | str join)
let newpath = ( let newpath = (
if ($env.NNN_TMPFILE | path exists) { if ($env.NNN_TMPFILE | path exists) {
let newpath = (open $env.NNN_TMPFILE | parse 'cd "{nnnpath}"').0.nnnpath # FIXME: fails if path contains single-quote
let newpath = (open $env.NNN_TMPFILE | parse "cd '{nnnpath}'").0.nnnpath
^rm -f $env.NNN_TMPFILE ^rm -f $env.NNN_TMPFILE
echo $newpath echo $newpath
} else { } else {