Skip to content

Commit

Permalink
Merge pull request #1890 from BeyondMagic/master
Browse files Browse the repository at this point in the history
quitcd: fix range limits for new nushell version
  • Loading branch information
jarun authored Jun 3, 2024
2 parents 0f10bd6 + 498d617 commit e0685e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misc/quitcd/quitcd.nu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export def --env n [
if ($nnn_tmpfile | path exists) {
# Remove <cd '> 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 4..-1 | str replace --all `'\''` `'`
let path = open $nnn_tmpfile
| str replace --all --regex `^cd '|'$` ``
| str replace --all `'\''` `'`

^rm -- $nnn_tmpfile

Expand Down

0 comments on commit e0685e9

Please sign in to comment.