diff --git a/stdlib-candidate/nupm.nuon b/stdlib-candidate/nupm.nuon index a7847e6..600a777 100644 --- a/stdlib-candidate/nupm.nuon +++ b/stdlib-candidate/nupm.nuon @@ -3,6 +3,6 @@ description: "Official candidates for Nushell standard library" documentation: "https://github.com/nushell/nu_scripts/blob/main/stdlib-candidate/std-rfc/README.md" license: "https://github.com/nushell/nu_scripts/blob/main/LICENSE" - version: 0.4.1 + version: 0.4.0 type: "module" } diff --git a/stdlib-candidate/path/mod.nu b/stdlib-candidate/path/mod.nu deleted file mode 100644 index 4f8c432..0000000 --- a/stdlib-candidate/path/mod.nu +++ /dev/null @@ -1,28 +0,0 @@ -# Update extension of input files. -# -# # Example -# - setting path ext to `rs` -# ```nushell -# > "ab.txt" | path extension "rs" -# ab.rs -# > "ab.txt" | path extension ".rs" -# ab.rs -# -# - setting a list of input path ext to `rs` -# > ["ab.txt", "cd.exe"] | path extension "rs" -# ╭───┬──────────╮ -# │ 0 │ ab.rs │ -# │ 1 │ cd.rs │ -# ╰───┴──────────╯ -# ``` -export def extension [ - ext: string -] { - let path_parsed = $in | path parse - if ($ext | str starts-with ".") { - $path_parsed | update extension ($ext | str substring 1..) | path join - } else { - $path_parsed | update extension $ext | path join - } -} -