Comments (8)
Not yet. Reason being, I rely on other CLI utilities for disk usage now (for example, gdu in Go or dua in Rust) as PowerShell is just too slow for this work.
However, it has been partly fixed in the issue I linked above, see gngrninja/PSFolderSize@adf71c7.
from powercolorls.
I think this seems to be a common problem with PS modules, as I had opened the same issue in this repository too about a month ago - gngrninja/PSFolderSize#20
from powercolorls.
If you have time I welcome a contribution to fix this. Otherwise I will look into it when I have the time :)
from powercolorls.
Upon some rudimentary research, I found that this line https://github.com/gardebring/PowerColorLS/blob/main/src/Private/FileAndFolderFunctions.ps1#L112 would require some object filtering in between the pipes; excluding directories that have the ReparsePoint
attribute (source - https://stackoverflow.com/questions/817794/find-out-whether-a-file-is-a-symbolic-link-in-powershell).
Is this correct? Note that this might require additional checks for figuring out junctions/hardlinks too.
I have my uni exams, I'll definitely try to send a PR once they're done.
from powercolorls.
Hi again @rashil2000
You are definitely at the right point in the code.
I did however try to create a symlink setup that should create recursion but it seems the powershell code in fact did not do this.
from powercolorls.
Yes, it seems like when we specify the ReparsePoint attribute, it just excludes those folders from listing but still recurses into them.
PowerShell 6+ doesn't follow symlinks by default, but provides a FollowSymlink flag in case we want to recurse into them.
However, for 5.1, we'll need to create a custom Get-ChildItem function, the one specified in this brilliant answer - https://stackoverflow.com/a/55544084
I tried using this and gives correct results for now. I'll do some more testing and send a PR :)
from powercolorls.
@rashil2000
any pr on the horizon?
from powercolorls.
Just keep in mind the difference between hardlinks, junctions, symbolic links, shortcuts, etc. Lot's of things there...
- https://superuser.com/questions/752538/mklink-vs-junction-exe
- https://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html
- https://kimconnect.com/windows-short-cut-vs-symbolic-link-vs-junction-vs-hard-link/
- https://superuser.com/questions/253935/what-is-the-difference-between-symbolic-link-and-shortcut
from powercolorls.
Related Issues (12)
- Symbolic linked files are not listed when by PowerColorLS HOT 5
- Add option to have internatioanl date format instead of long
- When command is aliased as `ls`, it breaks support for commands like `ls env:` HOT 2
- Import-Module failed at $glyphs["nf-fa-check"]
- Which font? HOT 1
- How to configure alias for the PowerColorLS command with options? HOT 2
- Add an (optional) flag to disable icons HOT 9
- [Feature Request] A flag for tree-like output HOT 1
- For some cases, icons are not displayed HOT 3
- Directories shown with a \ postfix when run on Linux HOT 3
- Possibility to use without the need for nerd fonts (i.e. disable icons) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powercolorls.