commit 71452faa400ed1a911c933a23b13937771ce2ff5
parent 0f10bd6cdcf210ed3e5cd4d3e0b5fe580818b586
Author: João F. (BeyondMagic/koetemagie) <koetemagie@gmail.com>
Date: Sun, 26 May 2024 23:05:14 -0300
quitcd: fix range limits for new nushell version
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/misc/quitcd/quitcd.nu b/misc/quitcd/quitcd.nu
@@ -28,7 +28,10 @@ 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 substring 3..
+ | str trim --char "'"
+ | str replace --all `'\''` `'`
^rm -- $nnn_tmpfile