mirror of
https://github.com/nushell/nushell.git
synced 2025-04-29 23:54:26 +02:00
Fixes #15559 # Description The glob command wasn't working correctly with symlinks in the /sys filesystem. This commit adds a new flag that allows users to explicitly control whether symlinks should be followed, with special handling for the /sys directory. The issue was that the glob command didn't follow symbolic links when traversing the /sys filesystem, resulting in an empty list even though paths should be found. This implementation adds a new `--follow-symlinks` flag that explicitly enables following symlinks. By default, it now follows symlinks in most paths but has special handling for /sys paths where the flag is required. Example: ` # Before: This would return an empty list on Linux systems glob /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor # Now: This works as expected with the new flag glob /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor --follow-symlinks ` # User-Facing Changes 1. Added the --follow-symlinks (-l) flag to the glob command that allows users to explicitly control whether symbolic links should be followed 2. Added a new example to the glob command help text demonstrating the use of this flag # Tests + Formatting 1. Added a test for the new --follow-symlinks flag |
||
---|---|---|
.. | ||
cd.rs | ||
du.rs | ||
glob.rs | ||
ls.rs | ||
mktemp.rs | ||
mod.rs | ||
open.rs | ||
rm.rs | ||
save.rs | ||
start.rs | ||
ucp.rs | ||
umkdir.rs | ||
umv.rs | ||
util.rs | ||
utouch.rs | ||
watch.rs |