quitcd: fix range limits for new nushell version

This commit is contained in:
João F. (BeyondMagic/koetemagie) 2024-05-26 23:05:14 -03:00
parent 0f10bd6cdc
commit 71452faa40

View file

@ -28,7 +28,10 @@ export def --env n [
if ($nnn_tmpfile | path exists) { if ($nnn_tmpfile | path exists) {
# Remove <cd '> from the first part of the string and the last single quote <'>. # 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. # 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 substring 3..
| str trim --char "'"
| str replace --all `'\''` `'`
^rm -- $nnn_tmpfile ^rm -- $nnn_tmpfile