1
0
Fork 0
forked from mirror/nnn

Merge pull request #1890 from BeyondMagic/master

quitcd: fix range limits for new nushell version
This commit is contained in:
Arun 2024-06-04 02:55:56 +05:30 committed by GitHub
commit e0685e98c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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