From 64e446f7f234688adf2497453f23ced2418e26c0 Mon Sep 17 00:00:00 2001 From: "a.stevan" <antoine.stevan@isae-supaero.fr> Date: Wed, 29 May 2024 15:09:25 +0200 Subject: [PATCH] move `remove-cache-prefix` to new `path.nu` --- bins/inbreeding/load.nu | 5 +---- bins/inbreeding/path.nu | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 bins/inbreeding/path.nu diff --git a/bins/inbreeding/load.nu b/bins/inbreeding/load.nu index c7b865e9..3c2c5cd7 100644 --- a/bins/inbreeding/load.nu +++ b/bins/inbreeding/load.nu @@ -1,10 +1,7 @@ use consts.nu +use path.nu [ "remove-cache-prefix" ] use ../../.nushell error "error throw" -def remove-cache-prefix []: path -> string { - str replace $"($consts.CACHE)(char path_sep)" '' -} - # return experiment names following `$ARG_EXPERIMENT_FORMAT` def get-experiments []: nothing -> list<string> { $consts.CACHE diff --git a/bins/inbreeding/path.nu b/bins/inbreeding/path.nu new file mode 100644 index 00000000..4614db12 --- /dev/null +++ b/bins/inbreeding/path.nu @@ -0,0 +1,5 @@ +use consts.nu + +export def remove-cache-prefix []: path -> string { + str replace $"($consts.CACHE)(char path_sep)" '' +} -- GitLab