1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-31 14:17:45 +00:00

Fix path with-parent example output (#1013)

Fix/follow-up to #1011
This commit is contained in:
132ikl 2025-01-06 14:25:00 -05:00 committed by GitHub
parent 977ffa6c02
commit a9b829115f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,9 +63,9 @@ export def with-stem [stem: string] { with-field stem $stem }
#
# - replace parent path with `/root/` for all filenames in list
# > ["/home/rose/meow", "/home/fdncred/"] | path with-parent "/root/"
# ╭───┬────────────╮
# │ 0 │ /root/meow │
# │ 1 │ /root/spam
# ╰───┴────────────╯
# ╭───┬───────────────
# │ 0 │ /root/meow
# │ 1 │ /root/fdncred
# ╰───┴───────────────
# ```
export def with-parent [parent: string] { with-field parent $parent }