Skip to content

Commit

Permalink
fix nu quitcd: switched quotes (#1737)
Browse files Browse the repository at this point in the history
Closes: #1736
  • Loading branch information
J-Kappes authored Sep 30, 2023
1 parent 3176eaa commit afe8486
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion misc/quitcd/quitcd.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit afe8486

Please sign in to comment.