nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 498d61763992ddbe1395b93bc5eb63df787efd90
parent 71452faa400ed1a911c933a23b13937771ce2ff5
Author: João F. (BeyondMagic/koetemagie) <koetemagie@gmail.com>
Date:   Mon, 27 May 2024 11:16:36 -0300

quitcd: nushell use regex to remove single quotes

Diffstat:
Mmisc/quitcd/quitcd.nu | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/misc/quitcd/quitcd.nu b/misc/quitcd/quitcd.nu @@ -29,8 +29,7 @@ export def --env n [ # 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 3.. - | str trim --char "'" + | str replace --all --regex `^cd '|'$` `` | str replace --all `'\''` `'` ^rm -- $nnn_tmpfile