diff --git a/misc/quitcd/quitcd.nu b/misc/quitcd/quitcd.nu index 129c3d3d..fe0d85a7 100644 --- a/misc/quitcd/quitcd.nu +++ b/misc/quitcd/quitcd.nu @@ -29,8 +29,7 @@ export def --env n [ # Remove from the first part of the string and the last single quote <'>. # Fix post-processing of nnn's given path that escapes its single quotes with POSIX syntax. let path = open $nnn_tmpfile - | str substring 3.. - | str trim --char "'" + | str replace --all --regex `^cd '|'$` `` | str replace --all `'\''` `'` ^rm -- $nnn_tmpfile