Terminal-Icons icon indicating copy to clipboard operation
Terminal-Icons copied to clipboard

Show-TerminalIconsTheme displays mostly reparse point images on Mac/PowerShelll 7

Open tillig opened this issue 3 years ago • 3 comments

Expected Behavior

When using Show-TerminalIconsTheme on a Windows machine, the terminal lists some example filenames and icons. I expect it to look like this on Mac using PowerShell Core as well.

Show-TerminalIconsTheme on Windows

Current Behavior

Using iTerm2 with PowerShell Core on Mac, most of the examples show as reparse points/shortcuts.

Show-TerminalIconsTheme on Mac

Both Windows and Mac in these examples are using the Fira Code Nerd Font 2.1.

Possible Solution

I'm guessing it has something to do with the differences in how DirectoryInfo and FileInfo are handled in Mac but I haven't had a chance to dive in.

Steps to Reproduce (for bugs)

  1. On both Windows and Mac install:
  • PowerShell Core
  • Fira Code Nerd Font 2.1
  • Terminal-Icons module
  1. On each respective install...
  • Import-Module Terminal-Icons
  • Show-TerminalIconsTheme

Context

I'm trying to figure out another issue I see where the XML icon seems to take up two characters, inserting a space before every XML file.

XML files have a weird space

Your Environment

  • Module version used: 0.4.0
  • Operating System and PowerShell version:
    • Mac OS Big Sur 11.2.3 / PowerShell 7.1.3 / iTerm 2
    • Windows 10 21359 (Insider Ring) / PowerShell 7.1.3 / Windows Terminal

tillig avatar Apr 19 '21 21:04 tillig

Sure enough, the default for a new FileInfo on Mac is to have LinkType set to SymbolicLink unless the file actually exists, in which case it's set to the real value. It does not appear LinkType can be set.

LinkType is SymbolicLink

tillig avatar Apr 19 '21 22:04 tillig

Confirmed. I'd rather not create temp directories/files just to show the icons, only to delete them all a second later. I'll look into a workaround.

devblackops avatar Apr 20 '21 04:04 devblackops

Created issue https://github.com/PowerShell/PowerShell/issues/15278

devblackops avatar Apr 20 '21 05:04 devblackops