A. Taha Baki d25be66929
check existance w/o traversing symlinks (#10872)
# Description

Currently `path exists` checks the file/folder's existence by traversing
symlinks. I've added a `-n` switch/flag that disables symlink
traversing, similar to what `path expand -n` does.

## The Long Story (for those interested)

Hello! 👋 While working on one of my scripts, I discovered that the `path
exists` command was traversing symlinks. This meant that even if the
file existed, it would fail if the pointed location didn't exist. To
address this, I've introduced a new `-n` flag, which I borrowed from the
`path expand` command. This addition should make the behavior more
consistent within the *path commands universe*.

## But, is it any useful?
 
```nushell
let compat = /run/media/userX/DriveX/steam/steamapps/compatdata
if "symlink" == ($compat | path expand -n | path type) {}
# to this
if ($compat | path exists -n) {}
```

# User-Facing Changes

Users, will not efect. Unless they use the mentioned `-n` flag/switch.
2024-01-14 07:33:33 +08:00
..
2022-11-22 16:58:11 -08:00
2023-10-05 18:43:58 +02:00
2023-11-16 15:14:45 -06:00
2023-10-24 12:48:05 -05:00
2023-11-03 10:09:33 -05:00
2023-10-19 09:30:34 -05:00
2023-10-10 03:31:15 +13:00
2023-11-17 19:30:53 -06:00
2023-10-13 13:45:36 -05:00
2023-09-16 21:49:10 +02:00
2023-03-15 18:54:55 +13:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-11-16 05:28:54 -06:00
2023-04-28 13:25:44 +02:00
2023-12-19 08:58:45 -06:00
2023-10-30 07:59:48 -05:00