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
1 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,8 @@ def-env n [...x] {
^nnn ($x | str join)
let newpath = (
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
echo $newpath
} else {